No data found dialogue

M

Manoli

On my main switchboard, I have a "Search by Status" button with a popup form,
with a drop down list of three statuses (All, In Progress, Closed)

When the user clicks the drop down arrow and selects a status, any data with
that status shows up which is fine.

The issue is when I don't have any data that matches that status. I am using
the following code so I'm not sure how else to proceed.

Private Sub search_status_Change()
Dim v_status As String
v_status = search_status.Value

DoCmd.OpenForm "f_request_status"
DoCmd.OpenForm "f_status_search_input"
DoCmd.Close

End Sub

In my other searches where I don't use a form for the parameter I am using
this code that I found the boards in the Open-Event.

Private Sub Form_Open(Cancel As Integer)

'EOF = True or RecordCount = 0 means no records
if Me.RecordSet.RecordCount > 0 then
'Records available, don't do anything
else
MsgBox "No records"
Cancel=true
end if

end sub

But this won't work with the form/parameter search.

Any help would be appreciated!
 
Top