To add to June7's link this is what I use to update the version number and revision date in the db title:
Code:
VPrivate Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("Do you want to change the version number?" & Chr(13) & _
"This should only be done by the Developer or the Super User...", vbCritical + vbYesNo, "Confirm version change!") = vbNo Then
Me.Undo
End If
'update the startup
SetApplicationTitle ("YourDatabase Version " & Me.CurrentVersion & " Revised " & Format(Nz(Me.ChangeDate, Date), "dd-mmm-yyyy"))
End Sub
Function SetApplicationTitle(ByVal MyTitle As String)
If SetStartupProperty("AppTitle", dbText, MyTitle) Then
Application.RefreshTitleBar
Else
MsgBox "ERROR: Could not set Application Title"
End If
End Function
Function SetStartupProperty(prpName As String, _
prpType As Variant, prpValue As Variant) As Integer
Dim db As DAO.Database, PRP As DAO.Property, WS As Workspace
Const ERROR_PROPNOTFOUND = 3270
Set db = CurrentDb()
' Set the startup property value.
On Error GoTo Err_SetStartupProperty
db.Properties(prpName) = prpValue
SetStartupProperty = True
Bye_SetStartupProperty:
Exit Function
Err_SetStartupProperty:
Select Case Err
' If the property does not exist, create it and try again.
Case ERROR_PROPNOTFOUND
Set PRP = db.CreateProperty(prpName, prpType, prpValue)
db.Properties.Append PRP
Resume
Case Else
SetStartupProperty = False
Resume Bye_SetStartupProperty
End Select
End Function
Cheers,