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

Cancel Subform Event From Parent

Status
Not open for further replies.

MelissaKT

Technical User
Jun 22, 2004
95
US
I know I'm probably just missing something, but I need some assistance! I have a form with a subform on it. It's a payroll type form. If the user's regular hours > 40, then the before update routine of the subform fires - this brings up a dialog box that asks if they want paid, comp or to split the time between the two. I have the subform set up to rollback the transactions if the cancel button on the main form is clicked. Here's the problem: If I click cancel, I don't want the dialog box asking if they want paid or comp to open. I haven't been able to figure out a way to cancel the subform routine from the main form.

I'd really appreciate any assistance. Thanks for your time.

Melissa
 
How are ya MelissaKT . . .

The [blue]BeforeUpdate[/blue] event can only be triggered when a record is saved. For your secnario [blue]this occurs when the focus is transferred from the subform to the button on the mainform (saving the record occurs first!).[/blue] So the saving of the subform record and triggering of the BeforeUpdate event can't be stopped.

Don't know enough about what your doing to continue from this point (espcially with the beforeupdate event) . . .



Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top