C
Chris
Help! I cannot see why this won't work.
At my user's new client entry they have available a button they can click
with code to abandon their current entry.
The parent form, subform1 (Bookingfrm) and subform2 (BCfrm) all get data
during a complete entry. Since the user (only when clicking the button) will
abandon the entry and the tables are related with cascading deletes, all
traces should be gone when done. When the user makes an entry to the parent
and non-[Bookingfrm] subform, no surprises. However, should the user never
get to the [Bookingfrm] or [BCfrm] the code throws an error stating a record
is required. My delete code follows:
'DELETES RECORD and RELATED
If Me.Dirty Then
Me.Undo
End If
If Not Me.NewRecord Then
RunCommand acCmdDeleteRecord
End If
Just ahead of the above code is code setting subforms back to data
entry=false. Note that the client entry form and [Bookingfrm] subforms are
always data entry types.
Of the following two lines, the error about the required record goes to the
second line.
Forms![frm1 cliententry].Form![CCfrm].Form.DataEntry = False
Forms![frm1 cliententry].Form![Bookingfrm].Form![BCfrm].Form.DataEntry = False
I have tried to save the record and even force an entry so the user won't
have to...I just can't get there from here with my limited experience --
virtually none!
Is there help for me?
At my user's new client entry they have available a button they can click
with code to abandon their current entry.
The parent form, subform1 (Bookingfrm) and subform2 (BCfrm) all get data
during a complete entry. Since the user (only when clicking the button) will
abandon the entry and the tables are related with cascading deletes, all
traces should be gone when done. When the user makes an entry to the parent
and non-[Bookingfrm] subform, no surprises. However, should the user never
get to the [Bookingfrm] or [BCfrm] the code throws an error stating a record
is required. My delete code follows:
'DELETES RECORD and RELATED
If Me.Dirty Then
Me.Undo
End If
If Not Me.NewRecord Then
RunCommand acCmdDeleteRecord
End If
Just ahead of the above code is code setting subforms back to data
entry=false. Note that the client entry form and [Bookingfrm] subforms are
always data entry types.
Of the following two lines, the error about the required record goes to the
second line.
Forms![frm1 cliententry].Form![CCfrm].Form.DataEntry = False
Forms![frm1 cliententry].Form![Bookingfrm].Form![BCfrm].Form.DataEntry = False
I have tried to save the record and even force an entry so the user won't
have to...I just can't get there from here with my limited experience --
virtually none!
Is there help for me?