Query has no record

P

Pele

Below is a code I was using to try and find out if a query
linked to a form had any record to display. I was going to
link the query to a macro that will run when a command
button called "Analysis" is clicked. Unfortunately, the
code keeps on giving an error saying "Type Mismatch".

Can anybody help with what to do?

Pele
 
P

Pele

Sorry about that...here is the code. Thanks.



Public Sub Arethereanyrecords(frmName As String)
If Forms(frmName).RecordsetClone.RecordCount = 0 Then
MsgBox "Your query has returned no records....You will
need to increase your query limit."
End If
End Sub

Public Function fnArethereanyrecords(frmName As String)
Call Arethereanyrecords
End Function
 

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