Jump to content

user abort of a loop


This topic is 6523 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have an FM6 DB with a script that results in printing academic reports for a particular year's students.

The script opens a report file for a student, on user pressing continue, prints the report, closes the report then opens the next student's report.

If cancel is pressed on the printer dialogue box being pressed then it closes that student's file and opens the next student's and so on.

But the problem is that once the script is started then ALL students' reports need to be processed before the script ends.

How can I add some script so that the user can abort the script at any time through the process?

Below is part of the script that controls the printing!

If [ Academic Year < 11 ]

Go to Record/Request/Page

[ First ]

Loop

Perform Script [ “Print Report” ]

[ Sub-scripts ]

Go to Record/Request/Page [ Next, Exit after last ]

End Loop

Else

The "Print Report" script is:

Allow User Abort [ Off ]

Set Error Capture [ On ]

If [ Academic Year < 11 ]

Go to Related Record [ StudOut_ ]

[ Show only related records ]

Perform Script [ Filename: “StudOut_.fp5”, “Print Student Reports from Student File” ]

[ Sub-scripts ]

Do I need to provide more info about the "StudOut" script?

Please help

Stephen

Link to comment
Share on other sites

look at adding in combination of modifier keys so you can hold down shift or ctrl or alt or all etc...:)

If [ Get ( ActiveModifierKeys ) = 4 ] see mod key help for info

Exit Script

Else

<>

End If

or why not...

Exit Loop If [ Get ( ActiveModifierKeys ) = 4 ]

much simpler and probably clearer to read

PS you may need something in the calc to test for the caps lock key being stuck down...

Edited by Guest
Link to comment
Share on other sites

This topic is 6523 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.