Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / February 2007

Tip: Looking for answers? Try searching our database.

How to specify a fully qualified field name?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Carpenter - 25 Feb 2007 23:12 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]
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]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.