Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do I need to requery?

Status
Not open for further replies.

hazelett

Programmer
Jun 29, 2001
15
US
This is a little complex so I hope I can describe the problem correctly.
I have a form with several unbound fields. I fill these in and push an update a file with the info. Works OK. Info is added to the file. One of the fields is a combo box with names called "Name" When I type in a name that is not in the list it jumps out to a form that lets me add name and address info. After I .update the information I also .requery the recordset which as I understand it should reorder the file with the new info. Now I go back to my previous form and press the update button but the record does not get written. If I go out of the name field and go back into it again and the search is made then it is all ok. I would like to write the record without that extra step. I think I need to refresh the combo box or I am using requery the wrong way. Any ideas? All suggestions are appreciated.

Terry
 
In your NotInList event after you add the new info:

Response = acDataErrAdded

This requeries the list after data is added.
 
I have already tried the "Reposnse = acDataErrAdded". I must have something else going on. I'm going to step through it and see if I can find out what it is.

Thanks for the assist.

Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top