Formatting a parameter?

Shellie

Registered User.
Local time
Today, 06:17
Joined
Mar 10, 2006
Messages
18
When using a query and asking for a user input, e.g. [Please enter a surname] - is it possible to design a form and link this to it ?

Shellie x
 
Basically Yes. Just create a form with the text box (or whatever0 you want & the formatting you want. Then, in your query you reference the control on the form with the expression in the following format: Forms!MyForm.MyControl .

The form must be open at the time the query is run & one way to do this would be to open the form and run the query from the form's code module. Alternatively, open the form from code (or macro) and then run the query from the same code (or macro).

There are many web-sites with lots of helpful tips on this & many other topics. A web-site linking to many such site is:
www.kayodeok.btinternet.co.uk/favorites/kbofficeaccess.htm

I hope this helps

GrahamT.
 
Ok...

I've created a form which a combo box and a command button, the command button runs a query (through the wizard).

However, when I run it, all records come up, not just the one that has been selected in the combo box.

Can I put something on my query so that it finds ONLY the record selected in the combo box ?
 
Yes in your query put the Forms!MyForm.MyControl in the criteria you are searching on, (Surname I presume)

My Form is the name of the form you created, and My Control is the name of the combo box
 

Users who are viewing this thread

Back
Top Bottom