Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 111
  • Last Modified:

Microsoft Access Table name

How do i set text box name if it has a space?
Snap1306.jpg
0
Hiroyuki Tamura
Asked:
Hiroyuki Tamura
1 Solution
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
Me![Assignment Group].SetFocus

 Anything with a space or a special character needs to be enclosed in square brackets ( [ ] ).


Jim.
0
 
Hiroyuki TamuraField EngineerAuthor Commented:
thank you.
0
 
Dale FyeCommented:
Well, I generally change the name of all of the controls on my forms, so that the control name is not identical to the field that is bound to it.  So I would recommend changing the name of the textbox to something like:

txtArgumentGroup

and refer to it as:

me.txtArgumentGroup.SetFocus

But if you don't want to do that, then you must wrap the name in brackets.

me![Argument Group]

But when you are referring to a control, you should use the dot (.) syntax, not the bang (!).  I only use bang when referring to a field in a recordset or which exists in a forms recordsource but does not have a corresponding control on the form.

me.[Argument Group]
1
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.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now