It's a three-fer: A Cancel Button!

cheuschober

Muse of Fire
Local time
Today, 08:29
Joined
Oct 25, 2004
Messages
168
Good morning all.

Todays ponderance involves a print form I've been devising. (It's included in a small sample)

You see, we have a major report that about 25 different people try run at different times with different criteria. All of the criteria that changes (mostly just a year in this case) is found in either a global parameters table or a separate table that involves the selection of a school or schools for print (via boolean). We have a complicated print macro that prints the maximum selected checkbox (for school) then updates the table to uncheck the school and runs again until the count of selected schools is = 0. A temporary form opens up to relock the records while the 10 minute process of running the actual report is happenning, then closes before a record update is performed and the process starts for the next school.

All of that's well and good.

The issue is the form we're putting together to bring the year and the schools selected into one secure environment where someone else can't change the criterion of another's report run by altering the data in one of the two parameter tables.

The report is bound to our global parameter table, as it only has 1 record and thus is bound to the year. A continuous subform hosts the checkboxes for school selection.

The print command button seems to work aright but I'm having three primary issues:

1) I can get the records to unlock when the print button is pressed (so that the report macro can run and begin to uncheck the boxes that need unchecking but when I attempt to lock both the form and subform in the OnLoad event of the main form I get an error.

2) If you look at the control source for the list box for lstYear, you'll see a nasty little bugger of a sql statement. When I hit the cancel, I would like to reset the value of this control to the max value produced by that statement. So far I've been close with both sql and a dmax but somewhere my syntax is off I think.

3) All of the checkboxes found on the subform need to be cleared before the form is closed. So far i can only get it to uncheck the one with focus. Is there a way to instruct it to clear all?

Much obliged to all who take an interest!
~Chad

Edit: Eeek! Forgot the attachment!
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom