Count records in a form

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

Guest

I have a hidden form with a control in the form footer that counts the
records in that form.

I then have a procedure on another form which references the count in the
footer of the first form.

If the count is zero I get the following:
Run-time error '2427':
You entered an expression that has no value

How can I get around this?

Thanks in advance.
 
If Forms![FormAuthReqCount]![SumPI] 0 Then
Forms![FormSwitchboard]![AuthLabel].Visible = True
End If
 
Try

If Nz(Forms![FormAuthReqCount]![SumPI],0) = 0 Then
Forms![FormSwitchboard]![AuthLabel].Visible = True
End If


Note that this assumes that FormAuthReqCount is currently open: you'll get
an error if it isn't.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Angus said:
If Forms![FormAuthReqCount]![SumPI] 0 Then
Forms![FormSwitchboard]![AuthLabel].Visible = True
End If

Douglas J Steele said:
What's the code you're using that's failing?
 
Back
Top