I hoped the following code, would select and then edit/update, a particular record in my recordset. Maybe I have the theory/syntax wrong.
When it gets to the .Edit command, I get an error, suggesting I've got the 'With Bookmark' idea wrong ?? You can see what I'm trying to do - any help much appreciated. Thanks.
Code:
Set rst = Me.RecordsetClone
strCriteria = "[Referral_ID] = '" & Me.Recordset!Referral_ID & "'"
rst.FindFirst strCriteria
Me.Bookmark = rst.Bookmark
If Not IsNull(Me.Parent!txtClient_ID.Value) Then
dt = Me.Referral_Date.Value
With Me.Parent
refid = Left(!txtForename.Value, 1) & Left(!txtSurname.Value, 1) & Format(dt, "ddmmyy")
cid = !txtClient_ID.Value
n = !Forename & " " & !Surname
End With
With Me.Bookmark
.Edit
!Client_ID = cid
!Referral_ID = refid
!CalcClient_Name = n
.Update
When it gets to the .Edit command, I get an error, suggesting I've got the 'With Bookmark' idea wrong ?? You can see what I'm trying to do - any help much appreciated. Thanks.