Validating A Richtext Field Before Saving The Document
fired only if there are no attachments and as well as no text.
Write this scrip in the QuerySave event of the form
'Body is the name of the Rich Text field
On Error Goto ErrSub
Call source.GoToField("Body")
Call source.SelectAll
Call source.copy
Call source.DeselectAll
Goto OkExit
'This error number will be generated when you
'try to copy the content of the empty field
ErrSub:
If Err = 4407 Then
Continue=False
Msgbox "Please enter values for the body field",48,"Error"
Exit Sub
End If
Resume OkExit
OkExit: