Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Error Problem (A97 SR01 under W98)

    I have a subform where one field in a record is a lookup from another table. However, if I start to enter a new record (e.g. start typing an entry into the lookup field or open the drop down box and select an entry), but then decide not to make the entry by, say, deleting the info in that field, the following message pops up when I try to select the record, or click on the Close Form control: "You tried to assign the null value to a variable that isn't a variant data type."

    I can find only two unwanted methods to exit this situation. One is to click on the close window (X) box which pops up the same message, but if I continue it lets me delete the record. I don't want to use this as I normally do not enable the close window (X) control, but I use my own Close Form control button for that purpose. However, clicking on the Close Form button only brings up the error message and unlike the X it never pops up with the delete record option. The only other way I have found is to go ahead and select one of the values in the drop down lookup field and then select and delete the record. This would be a somewhat awkward method for the rather unsophisticated data entry personnel that I expect to run the application.

    Any suggestions?

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Error Problem (A97 SR01 under W98)

    I'm not sure I understand your description of the problem, but it sounds like you haven't yet actually saved the record in the subform, which means you can't delete it. Have you tried using the Esc key? That effectively issues an Undo, which cancels the new record.
    Charlotte

  3. #3
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Error Problem (A97 SR01 under W98)

    Thanks Charlotte, you did it again. Hitting the ESC key twice does it!

Posting Permissions

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