Hi Guy's,
I've got a form which consists of a combo box and a single page form. The combo box filters the form.
Now some of the fields in the table are set as Required: Yes and I want it to stay that way.
When I choose a value in the combo box that doesn't have any associated records in the table, the form defaults to a new record which is good. That's what I want.
If the combo box is changed without completing the form fields the form tries to save the empty new record which of course fails because of the tables not null constraints.
How do I discard the empty record.
I've tried deleting it with a DoCmd.RunCommand acCmdDeleteRecord but it either errors or does nothing
I have tried workarounds that involved removing the constraints but then I get empty records inserted into the database and I want that even less than the error messages.
I've tried catching the error but catching doesn't let you discard or ignore the error. It just re-occurs.
There must be some way of getting rid of that error but for the life of me I cant figure it out.
Thanks.
I've got a form which consists of a combo box and a single page form. The combo box filters the form.
Now some of the fields in the table are set as Required: Yes and I want it to stay that way.
When I choose a value in the combo box that doesn't have any associated records in the table, the form defaults to a new record which is good. That's what I want.
If the combo box is changed without completing the form fields the form tries to save the empty new record which of course fails because of the tables not null constraints.
How do I discard the empty record.
I've tried deleting it with a DoCmd.RunCommand acCmdDeleteRecord but it either errors or does nothing

I have tried workarounds that involved removing the constraints but then I get empty records inserted into the database and I want that even less than the error messages.
I've tried catching the error but catching doesn't let you discard or ignore the error. It just re-occurs.
There must be some way of getting rid of that error but for the life of me I cant figure it out.
Thanks.