View Full Version : put a value in each field in my subform when I press the button "Delete"


mymy
08-15-2001, 09:35 AM
HI all
I would like to be able to put the value "" in each field in my subform when I try to delete the record in the form...My form's source is a table and the subform has another table...
Thanks in advance
Myriam

AlanS
08-15-2001, 11:01 AM
In the event procedure for the subform's On Delete event, put code to make the desired changes to the desired fields, and set the Cancel argument to True (to keep the delete action from actually happening). The code to change the fields can either be simple assignment statements (e.g., Field1 = "", Field2 = "", etc.) or you could get fancy and use DAO and a DO loop to cycle through all the fields.