Refresh? Requery? Something like that?

markcrobinson

Registered User.
Local time
Yesterday, 18:03
Joined
Nov 28, 2017
Messages
14
Forms!CustomerDisplay has a textbox BSearch and a combobox BsearchCombo
Enter some text in BSearch, Click on the Combobox dropdown with runs a Query on Like Besarch
Enter "mark" in Bsearch and all the records with "Mark" in it show up.
Works great -- once.

When I change the text in the BSearch Box, the query is still running on the old text "Mark" in this example.

If I exit, then reopen access -- works fine.
How do I reset it, refresh it, requery it?

Thanks!
 
OK. And where would I put that?
On a LostFocus event on the text box didn't work
 
how about the after update event of the combobox (if I understand your setup correctly which i'm not totally sure)
 
Mechanically, what steps in your DB actually trigger the search? What runs the query? Because the Me.Requery or Me.Refresh or whatever would go JUST BEFORE the actual step that runs the query.
 
Ended up putting the me.refresh when the search box lost focus. Works.
The me.requery didn't.
Thank you!
 
There is some other problem at play here. For this purpose, Me.Requery would do the same thing that Me.Refresh does. It makes no sense that Me.Refresh works when Me.Requery does not.

You need to examine further. Post the database if you want us to look at it.

Also, just in case this is the situation - to make this work correctly when the code is running in formA on an already open formB, you have to force formB to close and then reopen. Best to not do this at all. Just put the criteria controls on formB.
 

Users who are viewing this thread

Back
Top Bottom