Switchboard Programming

eTom

Registered User.
Local time
Today, 15:13
Joined
Oct 15, 2009
Messages
79
I used the wizard to create a switchboard, and modified the design a little. The form view is essential a vertical list of command buttons with labels after them. Clicking on the label or the button will of course launch the form or report that it is set to.

In design view, it looks much like the report design view in that it only shows 1 command button and label in the Detail section, with a header and footer above and below it.

By looking through the On Open property, it pulls data from the Switchboard Items table it created, and uses that data to draw the appropriate buttons and whatnot. The table has a "Command" field that lists 2 for forms, and 4 for reports, so that when you click on a button/label, it goes to the On Click event macro and uses OpenForm if the Command field is a 2, OpenReport if it's a 4, etc.

Other test switchboards I've created using the wizard work in this manner.

What I want to do is this: I want to separate forms and reports into two separate sides of the switchboard. I know I could do this by just creating a blank form and adding buttons and labels as necessary, but I rather like the fact that it draws it automatically for me when I just add more names to the Switchboard Items table. It's easily extensible.

I imagine what I need to do is find out where it's doing the actual drawing of the data in the Event tab of the properties, and put appropriate conditions. ie: [Command] = 4

I just can't find where this action is actually happening. Any ideas, or is this not even possible?
 
look at the code in the

HandleButtonclick event

when you click a button, this fires for the relevant number button

eg - the event handler for button7 is

=handlebuttonclick(7)
 

Users who are viewing this thread

Back
Top Bottom