Switchboard Question

R

rap43

I Have a Switchboard with 3 pages, can the individual page have different
color or images. If so how do you add these effects.

Thanks
 
L

Lee Hambly

Rap43,

Firstly, I am assuming you are using the switchboard from the switchboard
wizard... gonna give you somewhere to start, don't like teaching people to
suck eggs :)

There is a way to do this, you will have to use the code created by the
wizard and modify it. There are lots of different questions about what you
want to do, but hopefully this will give you somewhere to start from...

1. Open the table "Switchboard Items" and identify the records in that
relate to your 3 pages. You should be able to see them by recognising the
Page name you have set up. All the different options are in this table, so
don't think they are all pages.

2. Next if you open the "Switchboard" form in design mode and then open the
VB Editor (Alt-F11) and look for the "HandleButtonClick" subroutine. There is
a select case statement about two paragraphs down and the first case is
"conCmdGotoSwitchboard", this is what changes the page from one to the next.

3. This is the bit you will need to add your formatting code to. I would
suggest not deleting anything on this and I would also suggest making a copy
of it in notepad and saving it somewhere for an easy restore.

4. Basically you will be looking to add a bit of code which will change the
format of the various parts of your form when the "Page" changes. To do this
you will need to set up a piece of code for each page format type... you
could do this a number of ways, the most elegant would be for you to set up
the switchboard entirely first and then to add some fields to the table for
things like you image source, background colour etc, for each page and then
set these to the values you have in the table.
You can use me![SwitchboardID] in this part of the code to identify the
individual pages, these are the ID's you got from the "Switchboard Items"
table. Something like:

If Me![SwitchboardID] = 1 then
me.BackColor = 0 (or whatever)
else
me.BackColor = 255 (or whatever)
end if

I would suggest a SELECT CASE for this rather than IF, though.

Dunno if I have given you too much information or not quite enough, but
there is quite a bit here already...

This will probably break the "wizard" for future editing, but once its done,
its done. This is why you should set up the switchboard options beofre you
start screwing around with it.

Let me know if you need more help with this...

Lee
 
B

bsmith59

I Have aSwitchboardwith 3 pages, can the individual page have different
color or images. If so how do you add these effects.

Thanks

Rap43,

I'm not sure if this fits what you're looking for, but you could at
least check it out to see. UI Builder lets you customize the overall
color scheme, and has submenus. But you don't get to customize each
button's color.

http://www.opengatesw.com/products.aspx

Cheers,
Brandon Smith-Daigle
accesspro.blogspot.com (access tips for non-programmers)
 
Top