T
TeeSee
I have the following aircode in the BeforeUpdate event of a form
opened in acFormEdit. When I click the close button it activates this
code. The messagebox shows up and when I click it the form closes
anyway. I thought the setfocus line would hold the form open. Any
thoughts? Thanks
If IsNull(Me!MyRequiredField) or Len(Trim(Me!MyRequiredField))=0 then
MsgBox "RequiredField must have a value."
MeMyRequiredField.SetFocus
Cancel = True
End If
opened in acFormEdit. When I click the close button it activates this
code. The messagebox shows up and when I click it the form closes
anyway. I thought the setfocus line would hold the form open. Any
thoughts? Thanks
If IsNull(Me!MyRequiredField) or Len(Trim(Me!MyRequiredField))=0 then
MsgBox "RequiredField must have a value."
MeMyRequiredField.SetFocus
Cancel = True
End If