Access 2010 Me. shows CtlNameOfField instead of Me.NameOfField

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?
BFanguyAsked:
Who is Participating?
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
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
 
BFanguyAuthor Commented:
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
 
Rey Obrero (Capricorn1)Commented:
as i have said above, avoid using spaces, special characters in  the names of controls.
0
 
hnasrCommented:
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
 
BFanguyAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.