J
Jones Barton
Hi Everybody,
I am trying to write a bit a code that will pop up a msgbox if no selection
is made in the combo box. It does not appear to be recognizing that the
value of the combo box is null. Here is what I have written so far.
Dim stDocName As String
Dim stDocName2 As String
Dim msg
msg = "For this type of report you must fill in the prior period date
box."
stDocName = "Macro_RunSQL_CreateAARReport"
stDocName2 = "Macro_RunSQL_CreateAARReport_C+P"
If Forms![Create_AAR_Report]![ComboPriorPeriod_Date] = Null Then
MsgBox (msg)
Exit Sub
Else
DoCmd.RunMacro stDocName2
DoCmd.OpenReport "AAR_Type4", acViewPreview 'Thompsnon
End If
Any clues to what I have done wrong?
Jones
I am trying to write a bit a code that will pop up a msgbox if no selection
is made in the combo box. It does not appear to be recognizing that the
value of the combo box is null. Here is what I have written so far.
Dim stDocName As String
Dim stDocName2 As String
Dim msg
msg = "For this type of report you must fill in the prior period date
box."
stDocName = "Macro_RunSQL_CreateAARReport"
stDocName2 = "Macro_RunSQL_CreateAARReport_C+P"
If Forms![Create_AAR_Report]![ComboPriorPeriod_Date] = Null Then
MsgBox (msg)
Exit Sub
Else
DoCmd.RunMacro stDocName2
DoCmd.OpenReport "AAR_Type4", acViewPreview 'Thompsnon
End If
Any clues to what I have done wrong?
Jones