T
TeeSee
Using DAO. Access 2003
Having based a recordset on a combo box value I am now trying to
establish the RecordCount at any given time. While I understand that
DAO requires that you .MoveLast then (I'm quite happy to .MoveFirst at
the moment) to determine the RecordCount. Does access evaluate a zero
RecordCount immediately without the need to . .MoveLast/.Movefirst.
Further ..... if there are "no records" are we at EOF?
With rst
..MoveLast
..MoveFirst
End With
If rst.RecordCount = 0 Then
MsgBox "no records"
ElseIf rst.RecordCount > 0 Then
For Each ctl In [Forms]![frmProjectListBycompany].Controls
If ctl.ControlType = acTextBox Then
ctl.Visible = True
End If
Next
End If
If there are no records I get Run time error 3021 " no record"
Comments/feedback really appreciated. Thanks
Having based a recordset on a combo box value I am now trying to
establish the RecordCount at any given time. While I understand that
DAO requires that you .MoveLast then (I'm quite happy to .MoveFirst at
the moment) to determine the RecordCount. Does access evaluate a zero
RecordCount immediately without the need to . .MoveLast/.Movefirst.
Further ..... if there are "no records" are we at EOF?
With rst
..MoveLast
..MoveFirst
End With
If rst.RecordCount = 0 Then
MsgBox "no records"
ElseIf rst.RecordCount > 0 Then
For Each ctl In [Forms]![frmProjectListBycompany].Controls
If ctl.ControlType = acTextBox Then
ctl.Visible = True
End If
Next
End If
If there are no records I get Run time error 3021 " no record"
Comments/feedback really appreciated. Thanks