ItIsHardToProgram
Technical User
I was wondering if there was a way to bookmark a certain record without passing through a clone with this code:
And instead using something like this:
Regards, Julien
"Knowing that you know is the greatest sign of stupidity, knowing that you are ignorant is the best proof of intelligence.
Code:
dim rs as object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Date1] = " & "#" & Str(Nz(startdate)) & "#"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
And instead using something like this:
Code:
Set DB = CurrentDb()
Set rs = DB.OpenRecordset("Ftemps", dbOpenDynaset)
strWhere = "[Date1] = " & "#" & Str(Nz(startdate)) & "#"
rs.FindFirst strWhere
If rs.NoMatch Then
rs.AddNew
rs![Date1] = Str(Nz(startdate))
rs![Date2] = Str(Nz(enddate))
rs![Nom] = Y
rs![PreN] = z
rs.Update
End If
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
rs.Close
DB.Close
Set rs = Nothing
Set DB = Nothing
Regards, Julien
"Knowing that you know is the greatest sign of stupidity, knowing that you are ignorant is the best proof of intelligence.