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

togur

New member
Local time
Yesterday, 17:31
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
 

MajP

You've got your good things, and you've got mine.
Local time
Yesterday, 20:31
Joined
May 21, 2018
Messages
8,524
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
 

togur

New member
Local time
Yesterday, 17:31
Joined
Mar 26, 2021
Messages
5
Thanks for helping it was perfect working!
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:31
Joined
Oct 29, 2018
Messages
21,449
Hi. Welcome to AWF!
 

Users who are viewing this thread

Top Bottom