I need to find the last record based on a field that is being updated with a value from a combo box . I'm trying to do this by opening a recordset based on the table that the form is based on . as a Snapshop recordset and using the FindLast command . Also Once it finds the record I'm not sure if my last statement will actually cause it to go there.
This is currently executed On click from a command button inside the Open form. Would it be better to use a recordset clone?
Dim rst As Recordset
Dim strCriteria as String
strCriteria = Me!txtbox0
Set rst = CurrentDb.OpenRecordset("tblProbeCardHistory", dbOpenSnapshot)
rst.FindLast strCriteria
GoToRecord
Can anyone tell me what is wrong with this code or approach?
This is currently executed On click from a command button inside the Open form. Would it be better to use a recordset clone?
Dim rst As Recordset
Dim strCriteria as String
strCriteria = Me!txtbox0
Set rst = CurrentDb.OpenRecordset("tblProbeCardHistory", dbOpenSnapshot)
rst.FindLast strCriteria
GoToRecord
Can anyone tell me what is wrong with this code or approach?
Last edited: