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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing changed data on another form 1

Status
Not open for further replies.

kazprog

Programmer
Jan 28, 2004
11
GB
Hello, I was wondering what I am possibly missing when I try to do the following. I have a .mdb database and on it I have a combo box. This looks up the values in another table and populates the combo box with the key value of the table being looked up. If I then go and add a record that the combo box uses it does not appear in the combo box when I return to the form.

I have tried requery in VB and it only works if the combo box has not previously being clicked. Is there any way that I can get the most up to data always appearing when the combo box is pressed.

I also need to be able to do this in other places on the database.

Does anybody know what to do?
Any help would be greatly apprecieted

Thanks

Any
 
UNless I am mistaken, a Forms![FormName].Requery will refresh the form and its recordsource, but not necessarily its control's recordsources. You can use:

Forms![FormName]![controname].Requery

to force the combobox to requery itself no matter if it has been clicked or not...

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top