Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 99
  • 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 TamuraAuthor 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

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

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