Referencing a subform control value in a second control's Row Source SELECT statement.

zorvek (Kevin Jones)
zorvek (Kevin Jones) used Ask the Experts™
on
How do I reference a user input control on a sub form in a second control's Row Source SELECT statement?

What I have:

   SELECT Table1.Field1 FROM Table1 WHERE Table1.Field2=Me!SubForm1.form!Control1;

is not working as expected. The resulting list uses the Control1 value from the static form, not the currently entered value in Control1.

Kevin
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Hi zorvek,

Instead of Me! put in the whole form name.
Also after entering the value in Control1 do a requery.

Good Luck!

Gary
Top Expert 2008

Author

Commented:
I knew that! Once. A long time ago.

Thanks!!!

Kevin

Commented:
I'm honored to be able to help Royalty!
Top Expert 2008

Author

Commented:
Oh, please. A lot of long, lonely nights and a knowledge base full of canned answers. :-)

Commented:
"The modest person is usually admired, if people ever hear of them." Edgar Watson Howe

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial