Tab Control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
dmericksen said:
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?

TabControls do not affect the reference syntax at all. Just use the same
expression you would use if there were no TabControl.

Referncing controls on *subforms* does require a different syntax, but not
controls on TabControls.
 
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]
 
Back
Top