Update field

  • Thread starter Thread starter gr
  • Start date Start date
G

gr

hello!

I want to update a memo field ( fldConflicts) of table
tblEasyRent. I thought about using an Update query to do
this.
But I want to keep the old value of fldConflicts and
append at the end the new data.
I tried with no results the following:

strSQL = "UPDATE tblEasyRent SET tblEasyRent.fldConflict =
tblEasyRent.fldConflict & Me!dtStart & " - " Me!dtEnd
& ", " & Me!RentedBy & " WHERE tblEasyRent.EasyRentID = "
& Me!lngID

Thks!
 
gr said:
I want to update a memo field ( fldConflicts) of table
tblEasyRent. I thought about using an Update query to do
this.
But I want to keep the old value of fldConflicts and
append at the end the new data.
I tried with no results the following:

strSQL = "UPDATE tblEasyRent SET tblEasyRent.fldConflict =
tblEasyRent.fldConflict & Me!dtStart & " - " Me!dtEnd
& ", " & Me!RentedBy & " WHERE tblEasyRent.EasyRentID = "
& Me!lngID
Hi gr,

After the line above, type in

Debug.Print strSQL

then, after you run the code, look at the
string you have created....I bet you will
immediately see your error.

My *guess* is that you wanted:

strSQL = "UPDATE tblEasyRent SET tblEasyRent.fldConflict =
tblEasyRent.fldConflict & " & Me!dtStart & " - " & Me!dtEnd
& ", " & Me!RentedBy & " WHERE tblEasyRent.EasyRentID = "
& Me!lngID

Good luck,

Gary Walter
 
"better" guess:

strSQL = "UPDATE tblEasyRent SET tblEasyRent.fldConflict =
tblEasyRent.fldConflict & '" & Me!dtStart & " - " & Me!dtEnd
& ", " & Me!RentedBy & "' WHERE tblEasyRent.EasyRentID = "
& Me!lngID
 
Back
Top