Switchboard

NewEra

Registered User.
Local time
Today, 15:44
Joined
Mar 27, 2008
Messages
10
When I make a switchboard is there any way you can go to a table? or can you just go to a form or query? and when you make a switchboard and you have a button going to the form how can you go from the form back to the switchboard?
 
Last edited:
When I make a switchboard is there any way you can go to a table? or can you just go to a form or query?
Not if you use the wonderful little switchboard builder. But, you can go into the event tab for one of the button's properties and erase the onclick event (those cute eventhandle numbers that Access puts in). after you erase that, write your own click event for it. :)
and when you make a switchboard and you have a button going to the form how can you go from the form back to the switchboard?
either focus the switchboard or close your form. That would be the easiest way to do it!
 
That's why I pretty much never use the built in switchboard because it is just too limiting. I prefer to build my own forms and make them do what I want them to do.
 
look in the switchboard form code module (handlebuttonclick event)

it defines 8 different actions you can take

1 - another switchboard page
2 - open form - data entry mode
3 - open form - normal mode
4 - open report
5 - customize switchboard
6 - exit
7 - run macro
8 - run code

-------
you could easily modify this to allow other actions

-------

adam - i find this very flexible, but i dont think you should change a button click event as this will affect all pages, not just the current page

---------
finally - for newera's benefit

why would you want to open a table directly - i cannot really think of a single circumstance in which you would want a user to be able to open a table directly from a menu. I guess thats why MS didn't provide the switchboard manager with a "open table" hook - although clearly you could easily use option 8 to provide code to do this.
 
well to be honest you can open a table, just not directly. create a form and then a subform containing the table, obviously you wouldnt make it editable because that bad db design practice. The only reson and can think of for why you would be opening a table is for information purposes.

gemma i'm not sure what you mean when you say you shouldnt change the 'onclick' event and it will affect all pages. OnClick is specifically built for 1 object, e.g. a button, so unless you ahve multiple procedures running off 1 onclick event then i dont see how it can affect all pages.
 
in the switchboard the onclick event process a button, to run whatever arguments are desribed in the underlying table

so on menu page 1, button 3 may open another menu
on menu page 3, button 3 may run a report

changing a button click to hard code it to do something specific, may be ok on menu page 1, but definitley wont be on menu page 3, in this scenario

I find the MS switchboard really quite nice to use - although i added more buttons as standard - i actually have 17 - two columns of 8, and a return option, which is more than MS actually provide
 
Hope this helps!

Question 1...When I make a switchboard is there any way you can go to a table? or can you just go to a form or query?" - I create a macro with a procedure to open the table. Then I choose "run macro" as the command of the switchboard item.

Question 2..."and when you make a switchboard and you have a button going to the form how can you go from the form back to the switchboard? Your switchboard is actually a Form itself. You should be able to create a command button on your Form that opens the Switchboard form onclick.
 
Q1 - you shouldnt EVER need to open a table. Its dangerous. You obviously can code this behaviour, but I cant envisage ANY instance in which you would want to do this from a menu.

Q2 - in the switchboard generated by access, you dont have issues like ths ... the access switchboard doesnt close - all that happens is a form opens on top of it. when you close the from, the switchboard is still visible

this ought to happen with any switchboard, though - you dont need ot close it when you open another form from the master switchboard
 

Users who are viewing this thread

Back
Top Bottom