Using the FindLast Command

ctuna02

Registered User.
Local time
Today, 04:00
Joined
Dec 29, 2002
Messages
27
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?
 
Last edited:
Possibly your criteria as you are not defining the field in your recordset with which to apply the criteria.

Code:
rst.FindLast "[YourFieldName] = '" & strCriteria & "'"
 
I tried this now I'm getting a message that it Can't Find the FindLast Method?
 
FindLast Method ?

I guess this doesn't exist anymore in Access 2002. Is there any substitute ?
 

Users who are viewing this thread

Back
Top Bottom