Hi Tony,
Well there are almost an endless amount of ways to do this.
Brendan already suggested using registry or INI entries.
Here is another alternative done completely within the database.
1. Create a new table called tblInstallDate with one field
DateInstalled - Date/Time
Set it as the Primary Key.
2. In the open event of your main switchboard-type form
enter this code:
'***********Code Start************
Private Sub Form_Open(Cancel As Integer)
On Error GoTo ErrorPoint
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
If DCount("DateInstalled", "tblInstallDate") = 0 Then
' First time use, record the date and time
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("tblInstallDate")
With rst
.AddNew
.Fields("DateInstalled") = Now()
.Update
End With
End If
ExitPoint:
' Cleanup Code
On Error Resume Next
rst.Close
Set rst = Nothing
Set dbs = Nothing
Exit Sub
ErrorPoint:
MsgBox "The following error has occurred:" _
& vbNewLine & "Error Number: " & Err.Number _
& vbNewLine & "Error Description: " & Err.Description _
, vbExclamation, "Unexpected Error"
Resume ExitPoint
End Sub
'***********Code Start************
3. If you are using Access 2000 or 2002 make sure to
set a reference to the DAO object library.
4. Compile the code, save and close the form.
5. Under Tools | Startup make sure this form is set
to open when the database opens.
6. Now close the database and then re-open to test.
If there is no record in the table, a new record is silently
created when the main form opens. This will date stamp
the first time the application is used.
You will of course need to ship the application with the
table empty. This method is certainly not fool-proof by
any means, but you could make it much more difficult
to change by implementing User Level Security and then
disabling the Shift key bypass.
You could add additional fields to the table and record other
information as well such as user, computer name, etc.
It all depends on how sophisticated you want to get.
You can simply use this table information elsewhere
within the application.
Hope that gives you some ideas.