?
Solved

Access 2010 Me. shows CtlNameOfField instead of Me.NameOfField

Posted on 2013-10-30
5
Medium Priority
?
325 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 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 120

Expert Comment

by:Rey Obrero (Capricorn1)
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

752 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