Add a macro to User Login Window Form in Access

Dear,

I have a data bases which is secured by user login & password. Currently i have added a macro on "OK" button of login form which opens the Main Form on being true of User Login and Password detail. I want to add a macro or a VBA code on "OK" button which may also close the User Login Form on true execution of Login and Password detail.

Regards,

Maqsood

Hi Maqsood

You should just need to add this code to your existing macro, after the code which shows the Main Form . . .
(You will need to change form name)

Forms![frmLogin].Visible = False
___________________________________________________________________

Power to the Developer!

MSI GV72 - 17.3", i7-8750H (Hex Core), 32GB DDR4, 4GB GeForce GTX 1050 Ti, 256GB NVMe M2, 2TB HDD

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thanks Dave it worked...…………..

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated April 28, 2024 Views 734 Applies to: