T
Thomas Wright
In the following code done by the microsoft wizard to open another form,
I've found sometimes that the command button eventually fails to work, it
seems to get corrupted in some way. Today I found to my amazement that there
is no "where condition" in some of this code as it would seem from the
variable "stLinkCriteria" and specified at the end of the DoCmd. There is no
link identified as there is with stDocName. Could this really cause the
comand to fail as I have discovered (I think)?
Private Sub Command18_Click()
On Error GoTo Err_Command18_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Main Switchboard"
DoCmd.OpenForm stDocName , , , stLinkCriteria (Where condition)
Exit_Command18_Click:
Exit Sub
Err_Command18_Click:
MsgBox Err.Description
Resume Exit_Command18_Click
End Sub
I've found sometimes that the command button eventually fails to work, it
seems to get corrupted in some way. Today I found to my amazement that there
is no "where condition" in some of this code as it would seem from the
variable "stLinkCriteria" and specified at the end of the DoCmd. There is no
link identified as there is with stDocName. Could this really cause the
comand to fail as I have discovered (I think)?
Private Sub Command18_Click()
On Error GoTo Err_Command18_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Main Switchboard"
DoCmd.OpenForm stDocName , , , stLinkCriteria (Where condition)
Exit_Command18_Click:
Exit Sub
Err_Command18_Click:
MsgBox Err.Description
Resume Exit_Command18_Click
End Sub