Results 1 to 2 of 2
2002-05-18, 06:52 #1
- Join Date
- Feb 2002
- Thanked 0 Times in 0 Posts
Command to clear all ? (Access 2000)
RunTime error 3314
Is there a way to clear all the events and close the form after the command Cancelevent?
I have a form orders and a subform Suborders. In the main form i selct the customer and in the subofmr i select the products
Hoever the unit price for each product is defined with a lookup function according to the category of the client.
I have a select case statement foir the categories and at the end with the Case else i define what will happen when
no category is selectd.
MsgBox " the client is not categorized"
DoCmd.Close acForm, "FOrderinformation", acSaveNo
The code works fine, but after pressing ok on the dialog box the following problem appears.I get an error message
because my field unjt price is set to the Required property:
RunTime error 3314 : the field orderdetails.unitprice cannot contain a null value because the Required Property for this field is set to True.
Enter a value in this field. On pressing the End, my dtaabse blocks and i receive numerous messages that the order cannot be saved and at last i receive the
message that a fatal error has occured with Access. hIs it possible just to evade all this and to close the form without saving the record?
2002-05-18, 16:28 #2
- Join Date
- Dec 2000
- Sacramento, California, USA
- Thanked 1 Time in 1 Post
Re: Command to clear all ? (Access 2000)
Where is this code (in what subroutine) and why are you trying to use CancelEvent in the first place? Some form events can be canceled if they have a Cancel argument. Those that don't, can't be cancelled so you program them differently. It sounds like what you need is a Me.Undo to rollback the record.Charlotte