D
dbl
Hi I have a form called "OpenAccounts" that opens on a after update
procedure, from my Incident Data form. The "OpenAccounts" form is linked to
a query which finds matching open accounts, that part works fine, apart from
it fines the account that I have just opened. The qry searches by
Registration Number on the Incident Data Form.
What I want to do is close the form "OpenAccounts" if there is less than 2
records found, how do I do that? I have entered the following on the on
open event procedure but the Me.Count(*) part isn't right. How do you count
the records open in a form?
Private Sub Form_Open(Cancel As Integer)
If Me.Count(*) < 2 Then
DoCmd.Close
End If
End Sub
Bob
procedure, from my Incident Data form. The "OpenAccounts" form is linked to
a query which finds matching open accounts, that part works fine, apart from
it fines the account that I have just opened. The qry searches by
Registration Number on the Incident Data Form.
What I want to do is close the form "OpenAccounts" if there is less than 2
records found, how do I do that? I have entered the following on the on
open event procedure but the Me.Count(*) part isn't right. How do you count
the records open in a form?
Private Sub Form_Open(Cancel As Integer)
If Me.Count(*) < 2 Then
DoCmd.Close
End If
End Sub
Bob