Avatar of Hiroyuki Tamura
Hiroyuki Tamura
Flag for United States of America asked on

Microsoft Access Table name

How do i set text box name if it has a space?
Snap1306.jpg
Microsoft AccessMicrosoft Applications

Avatar of undefined
Last Comment
Dale Fye

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Jim Dettman (EE MVE)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Hiroyuki Tamura

ASKER
thank you.
Dale Fye

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]
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck