How to initialize Forms Query?

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

Guest

Open a form then select the menu option -> Records -> Filter by form ->
enter a filter criteria say 'Product' like 'D*'
apply filter this displays all products starting with D, if I want
to change the criteria to say 'Product' like 'E*'
it shows me all products starting with 'D' as well as 'E'.

I was wondering if there is a way to initialize the query criteria so that
it returns only 'E*'.

Thank you in advance,
 
I haven't tried it on a form. I have done it on listboxes though. This is
what I did:

qry = "SELECT data FROM Table WHERE conditions"

Listbox.RecordSource = qry
DoCmd.Requery "Listbox"

Hope it helps
 
Back
Top