Dates in macros (1 Viewer)

vrm-security

New member
Local time
Today, 04:49
Joined
May 22, 2000
Messages
7
I hope someone can help. I am trying to put a line in my autoexec that checks the date and does one of 2 things. If the current date is before a preset date (i.e. 1/1/001) the macro will cont. and database runs normally. If the current date is on or after the preset date it will go to a form and stop that says the database needs to be updated. Any ideas?
 

vrm-security

New member
Local time
Today, 04:49
Joined
May 22, 2000
Messages
7
the database as a whole. It is not that it needs to be updated, but more of a preventative messure to keep people from stealing the database. If I do not go in and change the date in the autoexec (and i have the line hidden in the middle of the autoexec macro) the database will not get past the screen that says it needs to be updated and to contact me.
 
R

Richie

Guest
You could try something like Date()>= DLookUp("DateField","TableName")in the conditions column.
 

vrm-security

New member
Local time
Today, 04:49
Joined
May 22, 2000
Messages
7
the field is not linked to a table. The form is. But I have a text box on it with the controll of =now(). this gives me the date. Or is there a was to just have the macro let at the date by itself. That would even be cleaner.
 

vrm-security

New member
Local time
Today, 04:49
Joined
May 22, 2000
Messages
7
the field is not linked to a table. The form is. But I have a text box on it with the controll of =now(). this gives me the date. Or is there a was to just have the macro let at the date by itself. That would even be cleaner.
 
R

Richie

Guest
I assume that you mean the preset date that of course is straight forward enough but how will you change it, or do you just want the verification once and once only?
 

vrm-security

New member
Local time
Today, 04:49
Joined
May 22, 2000
Messages
7
well i got it to work. It was right infront of me! But once I get something in my mind I can not see the forest for all the trees. I went back and did it the way you were going. Put another field in the startup table. Typed in the date. Then used your idea to compare the dates. Set it for 1/1/01. Now if I do not go in and change that date before then (or if someone steals the database, and they will not know to change the date) it will go to a form on startup and STOP there. I have a hidden area in that form that is set to on dbl click will take you to a password form and from there I can go in and change the date in the field, just incase I forget before 1/01. Thanks for all the help. (Got another project w/ imports if you know that?)
Jeff
 

Users who are viewing this thread

Top Bottom