Force "Cancel" on subform

skeeter23

$HASP OK
Local time
Today, 11:03
Joined
Apr 26, 2011
Messages
19
I have a subform that is used to create sequential job tracking tickets. It has a cancel button so that if the user needs to back out the status of that ticket will be set to cancelled.

The problem I have is that this operation can be easily bypassed by simply clicking the nav links on the main form at left or top. I tried setting the form value of the subform to modal and pop-up to no avail.

Also I need to be able to display a diaglog box or form with a message telling the user that they must cancel the ticket before they can continue.


I'm sure I'm missing something simple here :(
 
I must admit that I hadn't thought of that. I did try it and it didn't work but I know why. I need to provide more info...

The subform runs an append query on load to create a ticket ID and then stores that assigned ID as a tempvar to be used in append query criteria and make it unavailable to other users. This is why I need to cancel it if the user backs out.

All fields on the form are unbound and updated after the user fills in the information and clicks a submit button. The subforms are loaded through mainform click events (Forms!frmMAIN.Sub.SourceObject = "SomeForm").
 
Use a delete query to remove the ticket ID (from whatever table you appended it to) in the subform's on load event.
When you detect that a user has backed out of the subform without entering any ticket details, run the delete query.
 

Users who are viewing this thread

Back
Top Bottom