The key code that you will need is along the lines of:
- if Date() >= dateadd("M",3,[SomeDate]) then
-
MsgBox "Expired!"
-
Docmd.Quit
-
end if
That would go in the Open Event of the form that opens when the database is launched. This example simply exits the application when the current date is three months past 'Some Date'. Research the DateAdd function syntax and variations.
There are a variety of methods for setting the 'Some Date', which should be the date the database was first used in it's trial phase. One method would be to have a table that stores the date first used. That field would be blank/null when the database is first distributed. The same startup form Open Event could check that field for a null. If it is Null, populate it with the current date to record the first use. If it is not null, do nothing since that date has already been recorded.
The code to quit an expired database would then retrieve that stored date to determine whether the 'trial period' was done.