mfaqueiroz
Registered User.
- Local time
- Yesterday, 22:22
- Joined
- Sep 30, 2015
- Messages
- 125
Hei all 
I'm using for the first time the command rst.FindFirst, but isn't giving the right output--is moving always to first row
Dim strCriteria as String
Dim rst as DAO.RECORDSET
Date = RST.Fields(1)
Date1= Mid(Date, 7, 4) & "-" & Mid(Date, 4, 2) & "-" & Mid(Date, 1, 2) & " " & TimeValue(Date)
Machine1 = rst.Fields(2)
Tag1= rst.Fields(4)
strCriteria = "[State] = 'OK' and [Date] > #" & Date1 & "# AND [Machine]= ' " &Machine1 & " ' and [Tag] = '" &Tag1 & "' "
rst.FindFirst (strCriteria)
id2 = rst.Fields(0)
Could you please help me?
Thank you!!
I'm using for the first time the command rst.FindFirst, but isn't giving the right output--is moving always to first row
Dim strCriteria as String
Dim rst as DAO.RECORDSET
Date = RST.Fields(1)
Date1= Mid(Date, 7, 4) & "-" & Mid(Date, 4, 2) & "-" & Mid(Date, 1, 2) & " " & TimeValue(Date)
Machine1 = rst.Fields(2)
Tag1= rst.Fields(4)
strCriteria = "[State] = 'OK' and [Date] > #" & Date1 & "# AND [Machine]= ' " &Machine1 & " ' and [Tag] = '" &Tag1 & "' "
rst.FindFirst (strCriteria)
id2 = rst.Fields(0)
Could you please help me?
Thank you!!