Ashby said:
I need to state a date in the future and check if todays date is
greater than it.
If it is the close and exit the DB.
Anyone any examples on how to do this?
It's not clear how you intend to establish the future date in question.
But suppose you had it stored in a table named "Configuration", in a
field named "ExpDate", in the first or only record in that table. Then
you could have code like this:
If DLookup("ExpDate", "Configuration") < Date() Then
DoCmd.Quit
End If
Of course, you'd need to pick some suitable event to run this code.
Also, if your intention is to set a time limit on a trial version of
your application, this is clearly not at all difficult to detect and
circumvent.