I have a Memo field in a table to hold notes from a conversation a
social worker has had with a client (this is for a non-profit).
If the user needs to update the memo field, I need to find the
original record (which I am doing fine - getting the correct key)
and
I need to update the "notes" with the new value from the form, which I
store in a String Variable.
(I've tried storing in a Variant variable; didn't work for me)
I get the info I need, close the form, and run the SQL and I get "Type
Mismatch in Criteria".
I'm baffled (ok, it doesn't take much!) [Code below]
Any help is much appreciated.
Thanks -
Sara
' First, save the Initial call record - with updates
DoCmd.RunComman d acCmdSaveRecord
lngClientKey = Me.txtClientKey
lngInteractionK ey = DLookup("Intera ctionKey",
"tblInteraction History", _
"ClientKey = " & lngClientKey & " AND InteractionType Key =
6")
strPresProblem = Me.txtPresentin gProblem
' *******???????? ***???
' ON UPDATE initial call, update Presenting problem in Interaction
History (only audit is in Initial Call info audit record)
' *******???????? ***???
DoCmd.Close acForm, Me.Name
strSQL = "UPDATE tblInteractionH istory " _
& " SET tblInteractionH istory.Notes = " & strPresProblem & ""
_
& " WHERE tblInteractionH istory.Interact ionKey = " &
lngInteractionK ey
DoCmd.RunComman d strSQL
social worker has had with a client (this is for a non-profit).
If the user needs to update the memo field, I need to find the
original record (which I am doing fine - getting the correct key)
and
I need to update the "notes" with the new value from the form, which I
store in a String Variable.
(I've tried storing in a Variant variable; didn't work for me)
I get the info I need, close the form, and run the SQL and I get "Type
Mismatch in Criteria".
I'm baffled (ok, it doesn't take much!) [Code below]
Any help is much appreciated.
Thanks -
Sara
' First, save the Initial call record - with updates
DoCmd.RunComman d acCmdSaveRecord
lngClientKey = Me.txtClientKey
lngInteractionK ey = DLookup("Intera ctionKey",
"tblInteraction History", _
"ClientKey = " & lngClientKey & " AND InteractionType Key =
6")
strPresProblem = Me.txtPresentin gProblem
' *******???????? ***???
' ON UPDATE initial call, update Presenting problem in Interaction
History (only audit is in Initial Call info audit record)
' *******???????? ***???
DoCmd.Close acForm, Me.Name
strSQL = "UPDATE tblInteractionH istory " _
& " SET tblInteractionH istory.Notes = " & strPresProblem & ""
_
& " WHERE tblInteractionH istory.Interact ionKey = " &
lngInteractionK ey
DoCmd.RunComman d strSQL
Comment