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 / Forms / March 2008

Tip: Looking for answers? Try searching our database.

Unique Control Names

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul - 14 Mar 2008 02:27 GMT
Hello,

I know that each control on a form/report has to be unique, but do they have
to be unique to the whole .mdb project? I haven't encountered any problems
with a Customers form where I can use txtCustomerId, txtFirstName,
txtLastName, and etc. I do, however, have my fields in the tables unique by
prefixing them with the name of the table they reside such as a Customers
table (i.e. lngCustId, strCustFirstName, strCustLastName, and etc.).

I am using Access 2003.

Thanks for your help.

Regards,

Paul
Mr B - 14 Mar 2008 02:54 GMT
Paul,

Control name only have to be unique in each form or report.  The same
control name can appear in different form and/or reports.

Signature

HTH

Mr B
askdoctoraccess dot com

> Hello,
>
[quoted text clipped - 12 lines]
>
> Paul
John W. Vinson - 14 Mar 2008 04:18 GMT
>I know that each control on a form/report has to be unique, but do they have
>to be unique to the whole .mdb project? I haven't encountered any problems
>with a Customers form where I can use txtCustomerId, txtFirstName,
>txtLastName, and etc. I do, however, have my fields in the tables unique by
>prefixing them with the name of the table they reside such as a Customers
>table (i.e. lngCustId, strCustFirstName, strCustLastName, and etc.).

Neither precaution is necessary. Many people with wizard-generated forms have
innumerable controls named Label1, just for example; and using the tablename
as a prefix for fieldnames is probably preferred by a small minority.

If it works for you and helps clarify your documentation and understanding of
the database, go for it - but there's no builtin restriction on NOT doing so.
Signature


            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.