VBA?(about form)

J

John

I have a VBA as follows:



DoCmd.OpenForm "DLRQ", acNormal, acEdit



then this form list 300 records one by one,there is "Textbox 1" where I can
write information in ,above the form

If I want to open this form and only show me the record where the [Dealer
Name] in the form is equal to the "Textbox 1"

How should I write this VBA?



Thanks!
 
J

John W. Vinson

I have a VBA as follows:



DoCmd.OpenForm "DLRQ", acNormal, acEdit



then this form list 300 records one by one,there is "Textbox 1" where I can
write information in ,above the form

If I want to open this form and only show me the record where the [Dealer
Name] in the form is equal to the "Textbox 1"

How should I write this VBA?

DoCmd.OpenForm "DLRQ", acNormal, acEdit, _
WhereCondition := "[Dealer Name]=""" & Me![Textbox 1] & """"
 

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