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

    Wierd Error (Acc2002 W98 SR2)

    I have a subform with a datasheet view listing records in a table in which the Name field is defined as a required entry. When I enter a name in the Name field of a new record and then tab to the next field, it pops up an error message stating that the Name field cannot be blank! I can work around this by pressing ESC and it will then let me proceed to enter the rest of the record. I don't understand what's happening, as it seems that Access thinks I'm entering a record with no name whereas I just entered the name. It must be "looking" at the next (blank) record or something like that.

    Any suggestions?

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Wierd Error (Acc2002 W98 SR2)

    Is it possible that you have some VBA code in either the AfterUpdate event of the control containing the Name field?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

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

    Re: Wierd Error (Acc2002 W98 SR2)

    Hi Mark,

    There are no events set in properties of the Name field, so no VBA is associated with Name. Name is one field in a subform (datasheet type). The main form has a combo box with drop down list of fields in a related table. There is some after update VBA there because that's where I effectively set the selection criteria for the records to be displayed in the sub form.

    Another somewhat irritating problem is that when I exit the last field in the sub form it has the effect of going back up to the main form and selecting the next option in the combo box - so the subform goes there. What I expected that upon exiting the last field in last record of the subform that it would open up a new subform record.

    I realize that this is probably very confusing, and perhaps I'm trying to do something that can't be done.

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

    Re: Wierd Error (Acc2002 W98 SR2)

    I believe I've solved the one problem. Thanks for the help. However, I have another, but I've made it a new post.

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Wierd Error (Acc2002 W98 SR2)

    What was the problem, it is always good to know the answer to these problems.
    Cheers,
    Pat

  6. #6
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Wierd Error (Acc2002 W98 SR2)

    I don't know if this is the cause, but you should really try to avoid using a reserved word (like "Name") as a field or control name. Try changing the name of your control to txtName (or something like that), then use this name in all VBA. See if that doesn't clear up the problem.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

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

    Re: Wierd Error (Acc2002 W98 SR2)

    Hi Pat,

    The problem had to do with a sub-form. Upon exiting the first (required) field in a new record, an error message cropped up stating that the field could not be blank -- and this didin't make much sense. I think the problem went away when I changed the data source from a query to a table.

Posting Permissions

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