Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null entries in subforms!

Status
Not open for further replies.

sera

Technical User
Jun 29, 2000
360
US
Hello all!
I am having a problem. When a user enters data in a subform and then accidentally presses tab a null record is entered into my database. I want them to be able to add null data only if it is the only record that corresponds to the key! Sometimes it is important to have no data in the field! Does anyone know how to fix this problem?
Thanks,
Sera
 
Does this post make no sense? Or is this just something that no one knows how to fix?
Sera
 
Hi,

in your sub form you can write this code behined the control witch don't like to be Null,

Private Sub Thecontrol_Exit(Cancel As Integer)
If Not IsNull(Me.Thecontrol) Then
Else
MsgBox "Your Message to the user"
End If
End Sub

Hop Is Usefull

Good Luck


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top