Hi,
It's single user .mdb (for now).
i've created a generic form for a user to add a note to existing note
in a memo Note field in a table (myTbl). The relevant part of the
code:
'
NoteText = ExsntNote & Chr(13) & Chr(10) & Date & " (" & GetUserName &
") " & NoteText
strSQL = "UPDATE " & myTbl & " SET " & myField & " = '" & NoteText & _
"' WHERE " & myIDField & " = " & myID
CurrentDb.Execu te strSQL, dbFailOnError 'Adds the note to the target
field
'
So, all the above does is it takes the ExsntNote (current note in the
memo field), adds line feeder &Return, date, usrename and the new
note. the structute of "NoteText = ....NoteText" is because the new
NoteText is actually coming from a different form. This all is just to
not let the user remove/edit existing note but just to add new notes
to the existing one but still store all of the notes in a single notes
memo field (i.e., not multiple records).
The code works fine untill it reaches certain limit (seems to be
around 3000 characters) - then it runs into record lock error:
"3188,
Could not Update; currenlty locked by another session on this
machine."
So, i was hoping that you could advise whether the code has reached
some kind of memory limits or any other limit and how to overcome the
promlem if i were to stick with the structure where the notes are
still stored in one record instead of being added as new records (rows
in the table) each time.
Thanks!
It's single user .mdb (for now).
i've created a generic form for a user to add a note to existing note
in a memo Note field in a table (myTbl). The relevant part of the
code:
'
NoteText = ExsntNote & Chr(13) & Chr(10) & Date & " (" & GetUserName &
") " & NoteText
strSQL = "UPDATE " & myTbl & " SET " & myField & " = '" & NoteText & _
"' WHERE " & myIDField & " = " & myID
CurrentDb.Execu te strSQL, dbFailOnError 'Adds the note to the target
field
'
So, all the above does is it takes the ExsntNote (current note in the
memo field), adds line feeder &Return, date, usrename and the new
note. the structute of "NoteText = ....NoteText" is because the new
NoteText is actually coming from a different form. This all is just to
not let the user remove/edit existing note but just to add new notes
to the existing one but still store all of the notes in a single notes
memo field (i.e., not multiple records).
The code works fine untill it reaches certain limit (seems to be
around 3000 characters) - then it runs into record lock error:
"3188,
Could not Update; currenlty locked by another session on this
machine."
So, i was hoping that you could advise whether the code has reached
some kind of memory limits or any other limit and how to overcome the
promlem if i were to stick with the structure where the notes are
still stored in one record instead of being added as new records (rows
in the table) each time.
Thanks!
Comment