Query problem

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

Guest

I am writing a query to search my database. I have a child form in a parent
form to display my search result. I have a TextBox to enter the key for the
search and have a CmdButton to start searching. In the On Click event of my
CmdButton I write:

Me!Childform.Form.Filter = “[ChartNo]=†&TextBox
Me!Childform.Requery

But it doesn’t work, can anyone help me with this?
I have only one TextBox to enter the key, but the user will have several
options for the key like he can select Name, Birthdate, ChartNo…….as key to
search. Thank you.
 
Try this, instead of requery

Me!Childform.Form.Filter = “[ChartNo]=†&TextBox
Me!Childform.form.FilterOn = True
 
Hi Ofer,

Thank you very much. It works.
--
Jeff


"Ofer" 來函:
Try this, instead of requery

Me!Childform.Form.Filter = “[ChartNo]=†&TextBox
Me!Childform.form.FilterOn = True
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck



Jeff said:
I am writing a query to search my database. I have a child form in a parent
form to display my search result. I have a TextBox to enter the key for the
search and have a CmdButton to start searching. In the On Click event of my
CmdButton I write:

Me!Childform.Form.Filter = “[ChartNo]=†&TextBox
Me!Childform.Requery

But it doesn’t work, can anyone help me with this?
I have only one TextBox to enter the key, but the user will have several
options for the key like he can select Name, Birthdate, ChartNo…….as key to
search. Thank you.
 
Back
Top