Query problem

J

Jeff

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.
 
O

Ofer

Try this, instead of requery

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

Jeff

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top