Solved

Access 2010 Me. shows CtlNameOfField instead of Me.NameOfField

Posted on 2013-10-30
5
319 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 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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

738 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