> not sure what your goal is. do you want to allow users to add new notes, but
> prevent any existing notes from being deleted? or do you want to allow users
[quoted text clipped - 29 lines]
> >
> > A million thanks beforehand.
suggest the following: in the form, keep the existing textbox control
that's bound to the Memo field in the underlying table. set the control's
Locked property to Yes and Tabstop property to No.
now the user can see existing notes, scroll through them to read them, and
even highlight all or part of the text if s/he wants to copy it - but the
user cannot edit or delete the existing notes.
add another textbox control to the form, and *leave it unbound*. this is
where the user can enter notes for this record, whether or not there are
existing notes already. in the form's BeforeUpdate event procedure, add the
following code, as
If Not IsNull(Me!UnboundTextboxName) Then
Me!NotesFieldName = Me!NotesFieldName & vbCrLf & vbCrLf &
Me!UnboundTextboxName
End If
so new notes entered in the unbound textbox control, are automatically added
to the Notes field in the form's underlying table - without disturbing any
existing notes.
to allow the user to delete any or all of the existing notes, add a command
button to the form. in the button's Click event procedure, add the following
code, as
Me!BoundNotesControlName.Locked = False
Me!BoundNotesControlName.SetFocus
in the bound Notes control's BeforeUpdate event procedure, add the following
code, as
If MsgBox("The notes have been changed or deleted. Do you want to
continue?", vbYesNo, "Verify changes") = vbNo Then
Cancel = True
Me!BoundNotesControlName.Undo
End If
in the form's Current event procedure, add the following code, as
Me!BoundNotesControlName.Locked = True
now the user can click the command button to unlock the "existing" notes
control, and edit/delete them at will. before the control is updated, the
user has a chance to cancel the changes, or continue. and when s/he moves to
another record, the control is automatically re-locked.
hth
> Hi Tina, I first want to allow users to add notes without deleting the
> existing ones. However, If they by some important reason they need to
[quoted text clipped - 40 lines]
> > >
> > > A million thanks beforehand.
ILCSP@NETZERO.NET - 22 Nov 2005 16:35 GMT
Thanks Tina. It worked great.
tina - 22 Nov 2005 20:53 GMT
you're welcome :)
> Thanks Tina. It worked great.