Bring your Noise Back Here!...
Thanks again for the responses and the patience. Yeah, I got caught in the noise as well and then went down the rabbit hole of "Report Properties Tags" and that was fun. Below is the code that seems to work for my intended purposes but I have no idea if it is as clean as it could be.
Code:
Private Sub cboReports_AfterUpdate()
If Not IsNull(cboReports) And cboReports <> "" Then
DoCmd.OpenReport cboReports, acViewReport ' use acViewPreview for print preview
Else
End If
If Me.cboReports = "Personnel Arrived (Date Range)" And IsNull(StartDate) Then
MsgBox ("This is a Date Range Report. The report is blank because you must select both a Start-Date and an End-Date to populate this type of report."), vbCritical
cboReports.SetFocus
End If
If Me.cboReports = "Personnel Quit (Date Range)" And IsNull(StartDate) Then
MsgBox ("This is a Date Range Report. The report is blank because you must select both a Start-Date and an End-Date to populate this type of report."), vbCritical
cboReports.SetFocus
End If
cboReports = ""
End Sub
I added one more report to see if it works and it does... But it seems that I should be able to find some line of code where I could replace the name of the report with something like... Anything that contains "(Date Range)"
Code:
If Me.cboReports = "Any string of lettters (Date Range)" And IsNull(StartDate) Then
Lots of fun here...