I have created a simple search form for my users to query the database. Once the user fills out the search criteria and runs the search, another form opens displaying the results. Currently, if there are no records that match their search criteria, the Search Results screen opens blank (ie. no records in it). If the query returns no data, I would like to have a MsgBox open instucting the user there was no records found and to change their search criteria, but I am having some trouble getting Access to do it.
I have tried using the OnOpen event to detect if the form doesn't have data using the HasData method, IsEmpty method, IsNull method, etc. without any success. Basically, each method I have tried returns a FALSE value regardless if there is info. in the form or not. I am sure I am just not coding it improperly, but I have tried several code configurations and have looked at the examples so much my head is spinning! Does anyone have any suggestions?
Thanks!
James Stutz
I have tried using the OnOpen event to detect if the form doesn't have data using the HasData method, IsEmpty method, IsNull method, etc. without any success. Basically, each method I have tried returns a FALSE value regardless if there is info. in the form or not. I am sure I am just not coding it improperly, but I have tried several code configurations and have looked at the examples so much my head is spinning! Does anyone have any suggestions?
Thanks!
James Stutz