Hi All,
I have written some code which is as follows:
Private Sub Command19_Click()
Dim stDocName As String
stDocName = Me.frmMain.Form.List10.Column(0)
If stDocName = Null Then
MsgBox ("Please select one of the queries to run")
Else
DoCmd.OpenQuery stDocName, acNormal, acEdit
End If
End Sub
------------------
The first problem is that I need to check to see whether the code has value for stDocName. How do I code the line to look for a blank value.
Once this is fixed and the user sees the message box pop up, I need the code to reset itself so that the routine is rerun again. How do I get the sub to rerun again. I almost need a "goto" statement. Do I use the refresh option.
Thanks,
Evan
I have written some code which is as follows:
Private Sub Command19_Click()
Dim stDocName As String
stDocName = Me.frmMain.Form.List10.Column(0)
If stDocName = Null Then
MsgBox ("Please select one of the queries to run")
Else
DoCmd.OpenQuery stDocName, acNormal, acEdit
End If
End Sub
------------------
The first problem is that I need to check to see whether the code has value for stDocName. How do I code the line to look for a blank value.
Once this is fixed and the user sees the message box pop up, I need the code to reset itself so that the routine is rerun again. How do I get the sub to rerun again. I almost need a "goto" statement. Do I use the refresh option.
Thanks,
Evan