As promised (but delayed by heavy schedule), the attached zip file include a form which shows how to use multi-state buttons to select a report, start and end dates, type of report output, and additional data ranges (60/90 day). The button marked "create" has error trapping for missing values (client and report) as well as the WinFax DDE script previously posted.
Most sections of the script are bypassed since there are now reports included in this example (faster download). The file contains 3 tables and a database with one form. The zip file is about 78 K and unzips to about 580 K.
By using low and high colors, little "panel lights" show which report was selected by appearing to turn on lights (light/dark green). If a report doesn't require starting/ending clients and/or dates a text box is activated saying "doesn't apply" and the fields are marked with yellow lights.
After selecting client, dates, if the starting values are greater than the ending values, the fields and lights turn red. The form turns red while the create script is running since (in a larger database such as ours) some reports can result in the "blue bar of death" and noone wants the user to just turn off their computer and possibly fry the database.
We use a smiley face as an exit button (when you can leave the form and stop working you're happy...). The border of the button is turned red to show the user that he can't leave (button is disabled) - some people don't get the concept of the form turning red.
The report choice multistate button sets a number of values (indexes, lights on/off) in a script. The hardest part of the report choice button was ordering the choices so that rows and columns could be used with the lights. (It would be a lot easier if you could highlight and move a row in the choices parameter.) You can also set the values for the multistate in the form's script where the client names (A through K, skipping I since it looks like a 1). That method makes it a lot easier to play with the button's choice positions.
Wherever you see a group of buttons it is probably a multistate doing sopmething or other.
Try to not go too crazy playing with this. It's not as hard as it looks. As with most programming concepts, play around with the little parts and then just stick them all together (and hope it still works).
Enjoy.
Most sections of the script are bypassed since there are now reports included in this example (faster download). The file contains 3 tables and a database with one form. The zip file is about 78 K and unzips to about 580 K.
By using low and high colors, little "panel lights" show which report was selected by appearing to turn on lights (light/dark green). If a report doesn't require starting/ending clients and/or dates a text box is activated saying "doesn't apply" and the fields are marked with yellow lights.
After selecting client, dates, if the starting values are greater than the ending values, the fields and lights turn red. The form turns red while the create script is running since (in a larger database such as ours) some reports can result in the "blue bar of death" and noone wants the user to just turn off their computer and possibly fry the database.
We use a smiley face as an exit button (when you can leave the form and stop working you're happy...). The border of the button is turned red to show the user that he can't leave (button is disabled) - some people don't get the concept of the form turning red.
The report choice multistate button sets a number of values (indexes, lights on/off) in a script. The hardest part of the report choice button was ordering the choices so that rows and columns could be used with the lights. (It would be a lot easier if you could highlight and move a row in the choices parameter.) You can also set the values for the multistate in the form's script where the client names (A through K, skipping I since it looks like a 1). That method makes it a lot easier to play with the button's choice positions.
Wherever you see a group of buttons it is probably a multistate doing sopmething or other.
Try to not go too crazy playing with this. It's not as hard as it looks. As with most programming concepts, play around with the little parts and then just stick them all together (and hope it still works).
Enjoy.
Comment