Help With Query Syntax

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

H
My Problem concerns opening a form that has no under lying record
In the past I have opened the form and used the following code to check
If there are any records

If Me.RecordsetClone.RecordCount = 0
‘Close the for

Rather than open the form and then close it again how can I check to see if any records are returned before the form opens

Any help you could give me would most appreciate

Thank
 
Your form is based on a table or query. I'll use BasisName as the name of the
table or query. Use DCount to check if there are any records:

If DCount("*","BasisName") <> 0 Then
<Do this if there are records>
Else
<Do this if there are no records>
End If


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com


David said:
Hi
My Problem concerns opening a form that has no under lying records
In the past I have opened the form and used the following code to check
If there are any records

If Me.RecordsetClone.RecordCount = 0
'Close the form

Rather than open the form and then close it again how can I check to see if
any records are returned before the form opens?
 
Back
Top