Question Assistance on Updating a Memo field

magical

New member
Local time
Today, 15:19
Joined
Apr 8, 2009
Messages
4
Hi would be grateful if someone could provide me assistance. I am trying to update a memo field in access based on information typed into a text box.

I want to append a time and date to each entry into the memo field. So have created a variable that contains the whole detail to add to the field.

I then planned to transfer the contents of memo field to a seperate variable and combine the two before rewriting back to the database. However this does not appear to work.

Then wondered if I could you SQL Update and cannot seem to get this working.

Wondered if anyone had any thoughts.

Thanks,

Alex
 
This should work.

Code:
Private Sub Update()

CurrentDB.Execute "UPDATE Table1 SET Table1.Comment = '" & replace(YourText,"'","''") & "' "

End Sub
 
This is great, however if I then add a further comment to this field it overwrites the previous entry (guessing this is done by the replace in the code). Is there any way I can extract the contents of this field and store it in a variable. Then I can just append the text onto the front of this.

Thanks
 

Users who are viewing this thread

Back
Top Bottom