VBA ? ( Query and Filter ?)

M

Martin

I have a VBA as follows:



DoCmd.OpenQuery "DLRQ", acNormal, acEdit





Yet I want to open this query and only show me the list where the [Dealer
Name] in the table is equal to the "Textbox 1" in the "Form 1"

How should I write this VBA?



Thanks!
 
R

RonaldoOneNil

You don't change the VBA, you change the DLRQ query.
I am assuming the VBA below is in the Form 1 behind a button click ?
In the Criteria row of the Dealer Name field in your query put
[Forms]![Form 1]![Textbox 1]
 
M

Martin

Thank you very much!

Martin

RonaldoOneNil said:
You don't change the VBA, you change the DLRQ query.
I am assuming the VBA below is in the Form 1 behind a button click ?
In the Criteria row of the Dealer Name field in your query put
[Forms]![Form 1]![Textbox 1]

Martin said:
I have a VBA as follows:



DoCmd.OpenQuery "DLRQ", acNormal, acEdit





Yet I want to open this query and only show me the list where the [Dealer
Name] in the table is equal to the "Textbox 1" in the "Form 1"

How should I write this VBA?



Thanks!
 

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