Unloading Forms??

k209310

Registered User.
Local time
Today, 22:11
Joined
Aug 14, 2002
Messages
184
I have a form that searches a database for certain info. The results depend upon an entry in to a to a text box on a seperate form.

I can enter an entry in to the text box and the results will be displayed on the form. The problem occurs when i close the form and the try and enter a different entry in to the text box the results diplayed are the same results that were displayed in the first search.

I have had this problem before in excel where i used the unload form feature when closing down a form to clear the contents. Is there an access equivalent? Or is there another way to have my results update correctly?

Thanks for an help.
 
Are you remembering to Requery the object you are using to show your list.

If you were using a listbox to list all people from a department in the textbox, then remember to put:

lstListBox.Requery

to ensure that it updates your query.
 
Thanks for the reply

Do i have to requery for every text box and label or is there a way to requery the entire form?

Thanks
 
Ok that works great when i open up the form directly. However if if i open up the query from a seperate form via the form.visible function then i have the same the same problem. Am i using the correct method to open up the form?

I have put the ME.Requery function in the form_load decleration i have tried it in the same declerationform.visible however this hasd no effect.

I hope this makes sense.

Thanks again for the help.
 

Users who are viewing this thread

Back
Top Bottom