UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> How To Execute Code Of A Hidden Button, Access 2016    
 
   
hemant
post Feb 26 2020, 01:01 AM
Post#1



Posts: 26
Joined: 19-February 20



I have an Access VBA tool for HR dept. One of the buttons within this tool opens a form which is meant for a user who cannot have access to the remaining part of the automation. The user is supposed to fill up the details on this form and there is a button to Save the info. The form does not have any other buttons.

So as of now, after the user has filled up the details and then the HR executive closes the db and reopens it for his normal use.

I would like to have a hidden control or method to go back to the main menu OR the previous form - without having to close the db? Is it possible?
Go to the top of the page
 
MadPiet
post Feb 26 2020, 01:22 AM
Post#2



Posts: 3,550
Joined: 27-February 09



Have the form's OnClose event go to or open the form you want.
Go to the top of the page
 
projecttoday
post Feb 26 2020, 02:08 AM
Post#3


UtterAccess VIP
Posts: 11,782
Joined: 10-February 04
From: South Charleston, WV


Are you saying these two users use the same computer, one after the other? User one is restricted as to the screens he can use. User two is not restricted. Does user two, the one who closes the database, login with a password that identifies him as allowed? And you want to figure some way of avoiding his having to close the database and login with his password? How about putting a password on the restricted form?

--------------------
Robert Crouser
Go to the top of the page
 
theDBguy
post Feb 26 2020, 11:56 AM
Post#4


UA Moderator
Posts: 77,703
Joined: 19-June 07
From: SunnySandyEggo


Hi. Welcome to UtterAccess! welcome2UA.gif

Are you asking how to close the form with the Save button without closing the db? Sorry, I'm a little unclear on your question.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
hemant
post Mar 8 2020, 08:27 AM
Post#5



Posts: 26
Joined: 19-February 20



Thank you all for your replies. Due to some reason I could not view the replies earlier.

Just to clarify to Robert and DBGuy. This is for a new candidate who walks into office. The HR Executive opens a form on his laptop or on a PC in Conf Room for the candidate to update his data. Since this is being accessed by the external person, the form does not have any buttons to go back to the other options in the application.

MadPiet: Thanks. I am going to try the OnClose event - its a good idea.

Robert: Thanks for your idea too. I can have a button which requires a password to be entered to go back to the main application.

Go to the top of the page
 
RJD
post Mar 8 2020, 09:07 AM
Post#6


UtterAccess VIP
Posts: 10,321
Joined: 25-October 10
From: Gulf South USA


Hi: PMFJI, but just another idea. You can create a command button on the update form to take you back to the form you want (or other action). Make the caption, say, &/ (the & is the required part, the next character is your choice) ... place it in an obscure place on the update form, make it NOT a tab stop, then make the width zero so it does not show (invisible does not seem to work with this approach). When the HR person wants to leave the update form and go to the other form, use Alt-/ and that should do what you want.

You can have multiple command buttons like this with different shortcut keys, leading to different actions, known to the developer and the HR Executive.

Also, I would not give the candidate the ability to close the form, just Save.

Or, of course, you could create a custom Macro shortcut as well (which might be even easier).

Just a thought ...

HTH
Joe

--------------------
"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    28th March 2020 - 10:03 AM