D
Darrell Childress
I have a form with a checkbox (NoEngrReqd) and the following code:
This takes anything in the "Notes" field and adds a line return and the
text ***NO ENGINEERING REQ'D***. It works fine, but I'd like to know if
there is a way that the user can come back in to this order and UNCHECK
the "NoEngrReqd" box and have it automatically remove the phrase ***NO
ENGINEERING REQ'D***
Right now, they have to manually delete the text.
I was thinking of another solution. Create an unbound field (make
invisible) and make that field contain the above text if checked, NULL
if unchecked, and then add the contents of that field to the "Notes"
field. But then I would have to have another field called "FinalNotes"
to contain "Notes" + the unbound field. Any other suggestions?
Private Sub NoEngrReqd_BeforeUpdate(Cancel As Integer)
If Me.NoEngrReqd = True Then
Me.Notes = Notes & Chr(13) & Chr(10) & " ***NO ENGINEERING
REQ'D***"
Else
Me.Notes = Notes
End If
End Sub
This takes anything in the "Notes" field and adds a line return and the
text ***NO ENGINEERING REQ'D***. It works fine, but I'd like to know if
there is a way that the user can come back in to this order and UNCHECK
the "NoEngrReqd" box and have it automatically remove the phrase ***NO
ENGINEERING REQ'D***
Right now, they have to manually delete the text.
I was thinking of another solution. Create an unbound field (make
invisible) and make that field contain the above text if checked, NULL
if unchecked, and then add the contents of that field to the "Notes"
field. But then I would have to have another field called "FinalNotes"
to contain "Notes" + the unbound field. Any other suggestions?
Private Sub NoEngrReqd_BeforeUpdate(Cancel As Integer)
If Me.NoEngrReqd = True Then
Me.Notes = Notes & Chr(13) & Chr(10) & " ***NO ENGINEERING
REQ'D***"
Else
Me.Notes = Notes
End If
End Sub