Solved

Access 2010 Me. shows CtlNameOfField instead of Me.NameOfField

Posted on 2013-10-30
5
284 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
Comment Utility
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
Comment Utility
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
Comment Utility
as i have said above, avoid using spaces, special characters in  the names of controls.
0
 
LVL 30

Expert Comment

by:hnasr
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 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

11 Experts available now in Live!

Get 1:1 Help Now