2
2Blessed4Stress
I have a form which displays items-"Nomenclature". My subform displays the
various "lot numbers" associated with the "Nomen." On my subform I have an
'on current' code that displays "Lot Number # of #" for each Nomen. The
problem is when I get to a Nomen. that does not have any Lot Numbers, I get
the error message. This is what my code currently says:
Dim rst As DAO.Recordset
Dim IngCount As Long
Set rst = Me.RecordsetClone
With rst
.MoveFirst
.MoveLast
IngCount = .RecordCount
End With
Me.txtRecordNumber = "Lot Number" & " " & Me.CurrentRecord & " of " & " " &
IngCount
End Sub
Please give me the 1st version on how to fix this so that I don't get an
error message if there are no lot numbers or get a message saying "No Lot
Number".
various "lot numbers" associated with the "Nomen." On my subform I have an
'on current' code that displays "Lot Number # of #" for each Nomen. The
problem is when I get to a Nomen. that does not have any Lot Numbers, I get
the error message. This is what my code currently says:
Dim rst As DAO.Recordset
Dim IngCount As Long
Set rst = Me.RecordsetClone
With rst
.MoveFirst
.MoveLast
IngCount = .RecordCount
End With
Me.txtRecordNumber = "Lot Number" & " " & Me.CurrentRecord & " of " & " " &
IngCount
End Sub
Please give me the 1st version on how to fix this so that I don't get an
error message if there are no lot numbers or get a message saying "No Lot
Number".