I am building very simple database for inventory computer equipment. The data entry form has an unbound combo PCname for navigation. When a name is selected, its other fields (Make, Model etc) are sync'd. Works fine.
Now I want the form double for new record adding. i.e. if the user enters a name not on the list, the NotInList event fires and the user is asked if he wants to add the name. If so, I used acdataerradded response and docmd.sql to insert a new record to the "computers" table.
After that I want the form show the new record so the user can populate the other fields. But so far no luck. The rest of the form fails to sync with the new name in the combo. It works only if 1) I hit SHIFT F9 to requery manually. or 2) close and re-open the form.
I tried to put me.dirty = false and me!PCname.requery everywhere it fails to work. If I put the requery action in notinlist event it gives a 2118 error (you must save before you can requery).
I searched the web and found several people with the same problem w/o solution (most responders suggested adding dirty=false and/or requery, which apparantly won't work.
Note: AcDataErrAdded does make the new name onto the combo list but I need the rest of the form sync'd with it programmatically.