No Records Found

  • Thread starter Thread starter KP
  • Start date Start date
K

KP

Hi, I hope you are having a great day.

I have form based on query that checks a yes/no field for
yes matching records, i.e., were any parts on order. When
I open form and there are matches, I get said records.
When no records match, I get a blank form. Is there a way
to have a MsgBox display (No Matching Records Found)
instead of a blank form? If so, how I make it do that?

Thanks in advance and have a great day.
 
If the form is based on the query, you can check the RecordCount of the
form's recordset (Me.Recordset.Recordcount) in the OnOpen and display the
messagebox then.

HTH

--
Rebecca Riordan, MVP

Seeing Data: Designing User Interfaces
Designing Relational Database Systems, 2nd Edition
www.awprofessional.com

Microsoft SQL Server 2000 Programming Step by Step
Microsoft ADO.NET Step by Step
www.microsoft.com/mspress
 
Back
Top