form based off of query

M

Mark

Hi,

I have a form based on a query. When the user opens the
form... they are asked to enter the class ID... then the
form is opened and the text boxes are filled with
records. However, if there are no records for the class
ID that was entered... the form is opened with a blank
screen.

How can I make it so that when no records are in the
entered class ID number... a message box lets the user
know this and the form is then closed.

Should I use code in the form's Open form property? I'm
not sure on what the code would look like. I'm having
difficultly with using recordset type of coding.

Thanks for taking a look at this!
 
M

Mark

I got it working... FYI, I used:

If Me.RecordsetClone.RecordCount = 0 Then
MsgBox "No records"
Cancel = True
End If


To all, have a good one!!!!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top