record not refresh

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I create a form that has a dropdown box working as a navigate or a search
menu in the form header, when a specific item is selected, it will locate and
display all the records related with this.
Although I don't have a customer and order database, I'm using something
similar with this, so just for example, select a customerID, all the orders
of this customer will be displayed

Then I add this form to a tab control.

Everything works fine except everytime I get into the application, the
search result always remember last time's search result. I checked the
recordsource is to show all records but Don't know somewhere still remember
last time's search.
What I want is whenever get into the application, all the orders will be
shown.

I use refresh, requery, me.filter="", me.filteron=false, they don't help.
I think what may cause the problem is that I add the form to a tab form.
If I use the form itself there is no such problem.
I also experiment to just add the form as a subfrom to a main form.
It has the same problem.

Any suggestions would be appreciated
 
Putting the form onto a tab form, should not make any difference.

You do not need refresh or requery. You need the other two statements:
me.filter="", and me.filteron=false. Put those two statements in the
Open event of the form being filtered - not the tab form containing
that form.

HTH,
TC (MVP Access)
http://tc2.atspace.com
 
Back
Top