B
Baby Face Lee
Hi there everyone
Can you tell me how I go about the following:
I want to put the value of the last primary key number in a variable so I
did the following code:
Dim lngID As Long
Dim rs As Recordset
Set rs = Me.RecordsetClone
lngID = rs.FindLast "ID"
The last line tells me the syntax is wrong but I don't know what I should
do. It's OK to just have rs.FindLast "ID" on it's own but I want to assign
the value in the ID field to the lngID variable.
Can you perhaps explain where I'm going wrong?
Many thanks,
Lee
Can you tell me how I go about the following:
I want to put the value of the last primary key number in a variable so I
did the following code:
Dim lngID As Long
Dim rs As Recordset
Set rs = Me.RecordsetClone
lngID = rs.FindLast "ID"
The last line tells me the syntax is wrong but I don't know what I should
do. It's OK to just have rs.FindLast "ID" on it's own but I want to assign
the value in the ID field to the lngID variable.
Can you perhaps explain where I'm going wrong?
Many thanks,
Lee