Tab Control

D

dmericksen

I am writing a query which is dependent upon a control within a form (for
parameters in "where" statement). The control resides within a form and
within a tab. So, for example, my sql statement looks something like this:

Definitions:
Table Name: "tableA"
Field referencing form: "field"
Form: "masterForm"
Form Field/control: "field"


Select * from tableA where field.tableA = [Forms]![masterForm]![field]

Now, the problem is I do not know the correct syntax to reference a control
that resides within a tab within my form. Can somebody help me crack this?

Also, do you know of any good places to see proper syntax for questions like
this?
 
J

John W. Vinson

Select * from tableA where field.tableA = [Forms]![masterForm]![field]

That should be TableA.Field, not field.tableA...

As Rick says, the tab control plays no role. It's just a way to arrange screen
real estate, and has no effect on programmatic control references.

John W. Vinson [MVP]
 

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