Parameter query for a combo box row source

  • Follow


A query for a combo box on a form uses a value from a text box on the same 
form. Can I refer to the text box without specifying the form name? e.g.

Currently I am using "Forms!Form1!Text1" - would like to use something like 
"Forms!(Me.Name)!Text1" 


0
Reply JimP 4/26/2007 2:34:18 PM

No. If you use the criteria in the form, it must include the form name to 
find the text box.

It might be possible to write a VBA function that returns the value of the 
active text box on the active form, and then use the function in the 
criteria of your query.

Alternatively, it might be better to avoid putting the criteria in the query 
at all. Use the Filter of the form, or the WhereCondition of OpenReport.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"JimP" <jpockmire@houston.rr.com> wrote in message
news:4630b861$0$27093$4c368faf@roadrunner.com...
>A query for a combo box on a form uses a value from a text box on the same 
>form. Can I refer to the text box without specifying the form name? e.g.
>
> Currently I am using "Forms!Form1!Text1" - would like to use something 
> like "Forms!(Me.Name)!Text1"
> 

0
Reply Allen 4/26/2007 2:49:16 PM


1 Replies
910 Views

(page loaded in 0.131 seconds)

Similiar Articles:
















7/23/2012 10:14:07 AM


Reply: