Using macros, how do I specify a fully qualified name of a text field within
a form on one page of a tab control?
For example, on a normal form it would be:
Forms![FormName]![FieldName]
Tom Wickerath - 25 Feb 2007 23:31 GMT
Hi David,
Try adding an equals sign. I just created a test macro in the Northwind
sample database, as follows:
Action MsgBox
In lower window:
Message =[Forms]![Customers]![CompanyName]
I saved the macro, and opened the Customers form to an existing record. When
I run the macro, it displays a message box with the expected CompanyName
displayed.
Tom Wickerath
Microsoft Access MVP
http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
> Using macros, how do I specify a fully qualified name of a text field within
> a form on one page of a tab control?
>
> For example, on a normal form it would be:
> Forms![FormName]![FieldName]
John W. Vinson - 25 Feb 2007 23:39 GMT
>Using macros, how do I specify a fully qualified name of a text field within
>a form on one page of a tab control?
>
>For example, on a normal form it would be:
>Forms![FormName]![FieldName]
Forms don't have Fields (Tables have Fields); Forms have Controls.
The Tab Page is irrelevant with respect to referencing the control. If
the textbox is on a Subform, you need to use the Name property of the
main form and of the Subform control; the Subform control is the "box"
containing the subform, and it may or may not have the same name as
the form within it. The syntax is
[Forms]![Formname]![Subformcontrol].Form![textboxname]
The brackets are usually optional unless the form or control names
contain blanks or other special characters, but it never hurts to put
them in.
John W. Vinson [MVP]