Switchboard Manager Issues?

K

Kenny

I am having a problem and hope someone can help me out.
First of all I am using Access 97. I have used
switchboard manager to create my switchboards. I have one
form that I need to open in Datasheet view. I have this
coded to open this way, works fine if I open it up
manually. Once I set it on the Switchboard to open, it
opens up in form view (I have it set as open form in Edit
mode). Any suggestions?

Thanks for your time.
 
J

Jeff Conrad

Hi Kenny,

You have three options (at least) available to you.

1. You could make your form into a Continuous Form and
design it so it *looks* just like a datasheet. Then open
it in Edit mode from the Switchboard.

2. You could design your own "Switchboard-type" form and
launch all your procedures from there. Most, if not all, experts
prefer to build their own unbound forms for this purpose and
avoid using the Switchboard Manager.

3. You can change the Switchboard code a little bit to
achieve your desired result. The Switchboard automatically
will open a form in Single view. If you change the code to
datasheet view then ALL forms will open in Datasheet view
which is probably not a good thing. If you would like to
have the best of both worlds, follow these instructions on
a BACK-UP COPY.

Open the Switchboard code. Find the area that has this:

' Constants for the commands that can be executed.
Const conCmdGotoSwitchboard = 1
Const conCmdOpenFormAdd = 2
Const conCmdOpenFormBrowse = 3
Const conCmdOpenReport = 4
Const conCmdCustomizeSwitchboard = 5
Const conCmdExitApplication = 6
Const conCmdRunMacro = 7
Const conCmdRunCode = 8

Add one more line to the list like this:

Const conCmdOpenFormDatasheet = 9

Now go a little further down the code until you come to
this area:

' Run code.
Case conCmdRunCode
Application.Run rst![Argument]

' Any other command is unrecognized.
Case Else
MsgBox "Unknown option."

In between these two areas we want to add another one for
datasheet view. Add in this new code in the middle so it
looks like this:

' Run code.
Case conCmdRunCode
Application.Run rst![Argument]

' Open a form in Datasheet Mode.
Case conCmdOpenFormDatasheet
DoCmd.OpenForm rst![Argument], acFormDS

' Any other command is unrecognized.
Case Else
MsgBox "Unknown option."

Compile and save the form.

Now you will NOT be able to use the Switchboard Wizard to
use this option. The Wizard will only use the 8 pre-
defined options. To open a form in Datasheet View you will
need to go directly to the Switchboard Items TABLE and add
it yourself. If you study the records you will figure out
what is going on. Just use the number 9 in the Command
field to open a form in datasheet view and showing all
records.

Hope that helps,
Jeff Conrad
Bend, Oregon
 
G

Guest

Holy Smokes! You are a GENIUS! I will try this on a back
up. What are the disadvantages of making your own
switchboards vs. SBM (Switchboard Manager)?
-----Original Message-----
Hi Kenny,

You have three options (at least) available to you.

1. You could make your form into a Continuous Form and
design it so it *looks* just like a datasheet. Then open
it in Edit mode from the Switchboard.

2. You could design your own "Switchboard-type" form and
launch all your procedures from there. Most, if not all, experts
prefer to build their own unbound forms for this purpose and
avoid using the Switchboard Manager.

3. You can change the Switchboard code a little bit to
achieve your desired result. The Switchboard automatically
will open a form in Single view. If you change the code to
datasheet view then ALL forms will open in Datasheet view
which is probably not a good thing. If you would like to
have the best of both worlds, follow these instructions on
a BACK-UP COPY.

Open the Switchboard code. Find the area that has this:

' Constants for the commands that can be executed.
Const conCmdGotoSwitchboard = 1
Const conCmdOpenFormAdd = 2
Const conCmdOpenFormBrowse = 3
Const conCmdOpenReport = 4
Const conCmdCustomizeSwitchboard = 5
Const conCmdExitApplication = 6
Const conCmdRunMacro = 7
Const conCmdRunCode = 8

Add one more line to the list like this:

Const conCmdOpenFormDatasheet = 9

Now go a little further down the code until you come to
this area:

' Run code.
Case conCmdRunCode
Application.Run rst![Argument]

' Any other command is unrecognized.
Case Else
MsgBox "Unknown option."

In between these two areas we want to add another one for
datasheet view. Add in this new code in the middle so it
looks like this:

' Run code.
Case conCmdRunCode
Application.Run rst![Argument]

' Open a form in Datasheet Mode.
Case conCmdOpenFormDatasheet
DoCmd.OpenForm rst![Argument], acFormDS

' Any other command is unrecognized.
Case Else
MsgBox "Unknown option."

Compile and save the form.

Now you will NOT be able to use the Switchboard Wizard to
use this option. The Wizard will only use the 8 pre-
defined options. To open a form in Datasheet View you will
need to go directly to the Switchboard Items TABLE and add
it yourself. If you study the records you will figure out
what is going on. Just use the number 9 in the Command
field to open a form in datasheet view and showing all
records.

Hope that helps,
Jeff Conrad
Bend, Oregon

I am having a problem and hope someone can help me out.
First of all I am using Access 97. I have used
switchboard manager to create my switchboards. I have one
form that I need to open in Datasheet view. I have this
coded to open this way, works fine if I open it up
manually. Once I set it on the Switchboard to open, it
opens up in form view (I have it set as open form in Edit
mode). Any suggestions?

Thanks for your time.


.
 
J

Joan Wild

Since you have only one form that needs to open this way (I assume you have
other forms that you want to open in single form) do the following:

Open the Switchboard Form in design view. Go to View Code and find the
HandleButtonClick Function.

Beneath the constants add one more
Const conCmdOpenDatasheet = 9

Then further down you'll see
Select Case rst![Command]
Below this statement put

'Open a form in datasheet view
Case conCmdOpenDatasheet
DoCmd.OpenForm rst![Argument], acFormDS

Debug menu, Compile and Save All...and close the window. Next go to the
tables tab and open the Switchboard Items table
Find the record that refers to the one form you want to open as datasheet,
and in the command field change the value to 9.

That should do it.
 
F

fredg

Holy Smokes! You are a GENIUS! I will try this on a back
up. What are the disadvantages of making your own
switchboards vs. SBM (Switchboard Manager)?

** snipped **

Making your own Switchboard?
Disadvantages .... None that come to mind.
Advantages ... You have complete control over appearance,
functionality, maintenance, functionality, maintenance, functionality,
maintenance, (get the point), and your not limited to 8 buttons per
switchboard.
 
J

Jeff Conrad

Holy Smokes! You are a GENIUS!

ROFL!!!!
Boy do I have you fooled!!

Ok, we'll go with that then.
I will try this on a back up.

Good.
Make several back-ups to different directories as a precaution
What are the disadvantages of making your own
switchboards vs. SBM (Switchboard Manager)?

Disadvantages?
Let me think.....I honestly can't think of any except maybe speed.
Don't get me wrong, I like the Switchboard Manager and use it often, but it has lots of
limitations.

Here's just a few limitations:

1. You want more than 8 items on Switchboard?
Can't use the wizard then to add more.
I know how to work around this though.

2. Your trouble with opening a form in Datasheet mode.

3. You want to open a query from the Switchboard?
Can't use the wizard for this unless it is through the code option.
I know how to work around this as well (similar to the datasheet thing).

4. Have to change the code to exit Access instead of just the database.
That's a pretty easy one though.

5. You want different command button icons on each sub-menu?
This can be done, but with more coding.

6. You want different appearances for each sub-menu?
This can be done, but again more coding.

7. The Switchboard Items table needs to reside in the FE, not the BE to work.

Those are just a few off the top of my head.
Even though you CAN do a whole lot of customizing to the Switchboard form if you know what
you're doing, the point becomes, why not just make your own form(s)? The command button
wizards can easily walk you through opening forms and reports. I don't want to discourage
you from using it, in fact it may be just what you need. I just wanted to present all the
options to you.

Good luck,
Jeff Conrad
Bend, Oregon
-----Original Message-----
Hi Kenny,

You have three options (at least) available to you.

1. You could make your form into a Continuous Form and
design it so it *looks* just like a datasheet. Then open
it in Edit mode from the Switchboard.

2. You could design your own "Switchboard-type" form and
launch all your procedures from there. Most, if not all, experts
prefer to build their own unbound forms for this purpose and
avoid using the Switchboard Manager.

3. You can change the Switchboard code a little bit to
achieve your desired result. The Switchboard automatically
will open a form in Single view. If you change the code to
datasheet view then ALL forms will open in Datasheet view
which is probably not a good thing. If you would like to
have the best of both worlds, follow these instructions on
a BACK-UP COPY.

Open the Switchboard code. Find the area that has this:

' Constants for the commands that can be executed.
Const conCmdGotoSwitchboard = 1
Const conCmdOpenFormAdd = 2
Const conCmdOpenFormBrowse = 3
Const conCmdOpenReport = 4
Const conCmdCustomizeSwitchboard = 5
Const conCmdExitApplication = 6
Const conCmdRunMacro = 7
Const conCmdRunCode = 8

Add one more line to the list like this:

Const conCmdOpenFormDatasheet = 9

Now go a little further down the code until you come to
this area:

' Run code.
Case conCmdRunCode
Application.Run rst![Argument]

' Any other command is unrecognized.
Case Else
MsgBox "Unknown option."

In between these two areas we want to add another one for
datasheet view. Add in this new code in the middle so it
looks like this:

' Run code.
Case conCmdRunCode
Application.Run rst![Argument]

' Open a form in Datasheet Mode.
Case conCmdOpenFormDatasheet
DoCmd.OpenForm rst![Argument], acFormDS

' Any other command is unrecognized.
Case Else
MsgBox "Unknown option."

Compile and save the form.

Now you will NOT be able to use the Switchboard Wizard to
use this option. The Wizard will only use the 8 pre-
defined options. To open a form in Datasheet View you will
need to go directly to the Switchboard Items TABLE and add
it yourself. If you study the records you will figure out
what is going on. Just use the number 9 in the Command
field to open a form in datasheet view and showing all
records.

Hope that helps,
Jeff Conrad
Bend, Oregon

I am having a problem and hope someone can help me out.
First of all I am using Access 97. I have used
switchboard manager to create my switchboards. I have one
form that I need to open in Datasheet view. I have this
coded to open this way, works fine if I open it up
manually. Once I set it on the Switchboard to open, it
opens up in form view (I have it set as open form in Edit
mode). Any suggestions?

Thanks for your time.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top