The only problem I see with this is that if the last day of the month falls on a non-working day, the test will never evaluate to true. Who wants to come in to work on a Sunday just to open a database? ... LOL
The only way to
accurately do this sort of thing is to STORE, in a table, the last date the password was changed. Then, in whatever manner you want, and wherever you want, compare the MONTH AND YEAR of that date, to the CURRENT MONTH AND YEAR. If table date is LESS THAN, you need to change the password. Then update the table date.
You need to check Month AND YEAR, because January is less than December, remember?
If Month(lastChangeDate) < Month(Date())
or (Month(LastChangeDate) > Month(Date()) and Year(LastChangeDate) < Year(Date()) )
Then
{ Update your password here}
{ Update the LastChangeDate here}
Else
{ just go on about your bidness..}
End if
There are other ways to check if Now is January and THEN was December, but you get the drift....
Jim
How many of you believe in telekinesis? Raise my hand...
Another free Access forum:
More Access stuff at