Hi Guys
I have a Database that uses the GroupWise email system. The query form I am using has 2 possible arguments selected from Combo boxes. The user can choose a geographical area and then the code will email the query result to the people for that area.
I also want the users to have the ability to email the records for a particular month instead of just for the area.
I have got this working by making the system ask for a manual email address.
The problem that I am having is that when the area field is blank I am getting the error message 94 - Invalid Use of Null??
below is the code where I am trying to ignore the field if it is Null
If Forms!frmMonthlyReportAllCases!cboArea.Value = Null Then
Locality = ""
Else
Locality = Forms!frmMonthlyReportAllCases!cboArea.Value
End If
'Locality = Forms!frmMonthlyReportAllCases!cboArea.Value
Subj = "Please find attached for the month of " & MonthName(Month(Now()))
BodyText = "If you have any questions please contact me ."
'Open the form for exporting.
stDocName = "rptMonthlyReportAllCases"
DoCmd.OpenReport stDocName, acPreview
Any Ideas?
Graham