Help on text boxes

mdr0906

Registered User.
Local time
Today, 14:14
Joined
Oct 9, 2007
Messages
15
Hello,

On a subform, I would like a text box to be filled in before the user saves the record and enters in a new one. Perhaps, have a message pop up when that particular box is not complete? Moreover, the box that I'm referring to is not the field that links to the main form.

Hopefully, my question makes sense. Thanks.
 
In the form the subform is based on:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
 If Len(Me.TargetTextBox & "") = 0 Then
   MsgBox "TargetTextBox Must Be Filled In!"
   Cancel = True
   TargetTextBox.SetFocus
  End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom