Here is what I have tried.
I have 7 records in my linked table and it's only counting 4. Any ideas?
Code:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim i As Integer
Dim x As String
Set db = OpenDatabase("S:\Traceability V2\Shore Fresh Logistics_be_be.accdb")
Set rs = db.OpenRecordset("tblPalletRecords", dbOpenTable)
For i = 0 To rs.RecordCount - 1
If IsNull(rs.Fields("PalletNumber")) = True Then
GoTo NextOne1
Else
x = rs.Fields("PalletNumber")
If x = Me.PalletNumber.Value Then
Me.Status.Value = rs.Fields("Status")
End If
End If
NextOne1:
rs.MoveNext
Next i
rs.Close
Set rs = Nothing
db.Close
I have 7 records in my linked table and it's only counting 4. Any ideas?