before a login Form open, how to control the date if bigger than a certain date, also for setting the expired date

togur

New member
Local time
Today, 15:18
Joined
Mar 26, 2021
Messages
5
I created a DB File in Access and login Form as start up, but i wannt to have a code that control before opening the login form, if the computer date is bigger than a certain date, than the file of DB do exit
 
Create an autoexecmacro and have it call a procedure

Code:
Public sub Expired()
   If date() >= #1/1/2022# then
     Msgbox "Exceeded useable date, The DB will Close"
     docmd.quit
 end if
end sub
 
Thanks for helping it was perfect working!
 

Users who are viewing this thread

Back
Top Bottom