Solved

Access 2010 Me. shows CtlNameOfField instead of Me.NameOfField

Posted on 2013-10-30
5
293 Views
Last Modified: 2013-10-30
I have numerous fields on a form.  Some show up as Me.FieldName as ususal, but some can only be refereced by using Me.CtlFieldName - i tried compact and repair database.   I have never seen this behavior before.

any way to correct this to use the Me.FieldName?
0
Comment
Question by:BFanguy
  • 2
  • 2
5 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 39612190
revised the name of the controls with prefix,
for textbox > txtNameOfField
for combo > cboNameOfField

and, avoid using spaces in the names of the controls
0
 

Author Comment

by:BFanguy
ID: 39612210
I see it now, an example of the field name is "06-01_HT", evidently it does not like this type of name and it changed it to "Ctl06_01_HT" - must be something to do with the dash or underscore making it change.
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 39612226
as i have said above, avoid using spaces, special characters in  the names of controls.
0
 
LVL 30

Expert Comment

by:hnasr
ID: 39612359
Me.FieldName, was automatically assigned by access when dragging the field from field list to form.
ctlFieldName was manually manipulated.

Personally I prefer: fieldNameTxt, fieldNameLbl, fieldNameBtn and so on
This helps in sorting relevant controls conveniently.
Also, clicking first character in a list jumps to a control near to the intended one, instead of pressing 4 characters very fast to achieve the same effect if you are lucky.
0
 

Author Comment

by:BFanguy
ID: 39612367
access changed the me references on the fields now me.  i.e. Me.FieldName was dragged and access change the me reference to me.ctlfieldname.

i knew it did this with field names with spaces, but i did not realize it did this also with field names with underscore (or dash - not sure which one caused this.

thanks guys
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now