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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform combo box error 'null value/required field'

Status
Not open for further replies.

hmstoo44dd

Programmer
Sep 27, 2002
32
US
I have a form with a continuous subform. The subform contains a combobox where you can search the customers table to enter customers names. When you tab to create a new entry then decide not to there is no problem. However, if you do a search and don't find the correct name, you can't get out of the record because of a 'null value/required field' error. Is there a way to prevent this without adding a delete record button/task or adding an error capture/handle event?
 
why not have error handling?

--------------------
Procrastinate Now!
 
How are ya hmstoo44dd . . .
Code:
[blue]   If Name Found Then
      [green]'Do This[/green]
   Else
      Me.Undo
   End If[/blue]

Calvin.gif
See Ya! . . . . . .
 
I think I'm looking for a way to automate backing out of a record using the escape key.

I captured the error and tried to use undo and deleterecord but, both failed when the required fields were null. If I fill in all required fields I can then do a deleterecord.

This is the same behavior as starting to add a new record to a table and then trying to save without required fields.
 
hmstoo44dd . . .

Is [blue]Required[/blue] set to yes in the tables for the fields of interest?

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top