Access Query with Textbox as criteria

dan-dre

New member
Local time
Today, 22:43
Joined
Dec 8, 2003
Messages
7
Dudes & Dudettes,

I have what is probably a straightforward problem but its solution eludes me. I have a textbox (TBOX) in which the user types some text. I have a command button (CmdBtn) which the user clicks.

What I initially want to do is use the text from the textbox as the condition for the query when the user clicks the button.

ie SELECT *
FROM TABLEWHATEVER
WHERE something = valuefromtextbox.

The query will then return several rows, each of which I want to add to a listbox (Lbox) on the same form.


Any suggestions would be most appreicated.

Thanks in advance all
 
You can put this as the criteria:

[Forms]![MyForm]![MyTextbox]
 
As easy as that eh?! Works splendedly - thanks!
 
One more quicky: any thoughts as to achieve the following:

Now I've got my query reuslts, is there an easy way to put them straight into a combo box?

Thanks so much

dre
 

Users who are viewing this thread

Back
Top Bottom