In Access, is there a command to go to a control in design view from a command button?

In Access, is there a command to go to a control in design view from a command button?
dailymeatAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
sorry, but none. You can put the form in design view from a command button click with

docmd.openform me.name, acdesign
0
PatHartmanCommented:
What are you trying to do?
0
dailymeatAuthor Commented:
Want to open form in design view, go to a command button,  property event
0
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

PatHartmanCommented:
OK, we got that much.  What do you want to do at that point?  Why do you have to put focus on the control?  Once the form is open in design view, you should be able to reference any control directly.   Keep in mind that Access is a Rapid Application Development tool intended for use in creating data-centric applications.  It isn't a graphic design tool so there is a limit to what you can actually do programmatically in design view.

Are you making a tool for yourself because this is not something you would ever do in an application you built for others to use.
0
Rey Obrero (Capricorn1)Commented:
my post at #a42041204  already answered your question.
0
Jeffrey CoachmanMIS LiasonCommented:
If I am understanding your request here correctly, ...You can try code like this perhaps:
(It worked for me, ...again, ...If I am understanding your request here correctly)

Private Sub Command13_Click()
    DoCmd.OpenForm "YourForm", acDesign
    Forms![YourForm]![CustName].InSelection = True
End Sub

Sample db attached

Not sure why you would need to do this...?
Also note that this will NOT work in a Runtime

JeffCoachman
Database22.accdb
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dailymeatAuthor Commented:
It worked!, thank you
0
Jeffrey CoachmanMIS LiasonCommented:
Thanks, ...it took me a while to get the syntax just right.

Just note the cautions we all mentioned...

JeffCoachman
0
Rey Obrero (Capricorn1)Commented:
@jeff
that is nice. learned something new today ;-)
0
Jeffrey CoachmanMIS LiasonCommented:
Cap, ...Yeah, ...
For some reason, years ago, I remember a question on this, ...I think Scott posted the syntax...
;-)
I was not even certain the syntax still worked...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.