I have been trying to improve the speed of my database by implementing a Persistent Connection as per my post
thread705-1524118 where PHV (great thanks) provided help.
In order for the persistent connection to work, Ineed to keep this form open hit INvisible.
I have been trying several ways to make the form invbisible to no avail. The form is currently opened by the 'StartUp' function under the Tool menu.
Can someone tell me where I am makign the error? Thanks!
Private Sub Form_Open(Cancel As Integer)
OpenAllDatabases True
On Error GoTo ErrorHandler
Dim StrVerClient As String
Dim StrVerServer As String
Dim stDocName As String
Dim stLinkCriteria As String
' Populate module level variables when form loads.
StrVerClient = Nz(DLookup("[ver_clt]", "[tbl_version_client]"), "")
StrVerServer = Nz(DLookup("[ver_ser]", "[tbl_version_server]"), "")
If (StrVerClient <> StrVerServer) Then
MsgBox "Your version of WAD is not up to date, please contact your database administrator", vbOKOnly, "Outdated WAD version"
Me.Visible = False
stDocName = "menu_main"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
Me.Visible = False
stDocName = "menu_main"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
ExitHere:
Exit Sub
ErrorHandler:
MsgBox "Take note of the error number and description" & vbCrLf & Err.Number & vbCrLf & Err.Description & vbCrLf & "Contact your database administator with that information", vbOKOnly, "Unplanned Error"
Resume ExitHere
End Sub
If I did not say it before, I really appreciate the time and expertise of the users on this forum.
thread705-1524118 where PHV (great thanks) provided help.
In order for the persistent connection to work, Ineed to keep this form open hit INvisible.
I have been trying several ways to make the form invbisible to no avail. The form is currently opened by the 'StartUp' function under the Tool menu.
Can someone tell me where I am makign the error? Thanks!
Private Sub Form_Open(Cancel As Integer)
OpenAllDatabases True
On Error GoTo ErrorHandler
Dim StrVerClient As String
Dim StrVerServer As String
Dim stDocName As String
Dim stLinkCriteria As String
' Populate module level variables when form loads.
StrVerClient = Nz(DLookup("[ver_clt]", "[tbl_version_client]"), "")
StrVerServer = Nz(DLookup("[ver_ser]", "[tbl_version_server]"), "")
If (StrVerClient <> StrVerServer) Then
MsgBox "Your version of WAD is not up to date, please contact your database administrator", vbOKOnly, "Outdated WAD version"
Me.Visible = False
stDocName = "menu_main"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
Me.Visible = False
stDocName = "menu_main"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
ExitHere:
Exit Sub
ErrorHandler:
MsgBox "Take note of the error number and description" & vbCrLf & Err.Number & vbCrLf & Err.Description & vbCrLf & "Contact your database administator with that information", vbOKOnly, "Unplanned Error"
Resume ExitHere
End Sub
If I did not say it before, I really appreciate the time and expertise of the users on this forum.