Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Run-time error when moving off a text box (2003)

    If I input data in the LETT text box of either subform of the startup form in the attached mdb and then move off it I get the message: <font color=448800>Run-time error '2001': previous operation has been cancelled. </font color=448800>
    and the code stops at the line<font color=red>
    e = DLookup(fname, tab1, "dgior =#" & Format(DMax("dgior", tab1, _
    "[Giorno]<#" & Format(gio, "mm-dd-yyyy") & "#"), "mm-dd-yyyy") & "#") </font color=red>
    of the EnerOm2 function
    Clicking on the ? button of the same dialog box doesn't give any help.
    What's the cause of it?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Run-time error when moving off a text box (2003)

    When the function is called, tab1 is "Gruppo4". The Gruppo4 table does not contain a field named Giorno, so the DMax function fails. You may fare better if you replace Giorno with DGior. I got several messag boxes with Italian text when I did that, but no error message.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run-time error when moving off a text box (2003)

    <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30>
    Thank you Hans.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •