A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Switchboard doesn't open form in Datasheet View



 
 
Thread Tools Display Modes
  #1  
Old September 24th, 2004, 01:49 PM
Tom
external usenet poster
 
Posts: n/a
Default Switchboard doesn't open form in Datasheet View

I have been using the "Switchboard" (I believe it's used in Northwind.mdb)
for a while now.

One of my forms needs to open in "Datasheet" view. When the form is linked
to one of the menu buttons, it opens in "Single Form" view. I don't want
that.

Does anyone know how I can it can be opened (via Switchboard menu button) in
Datasheet view?

Thanks,
Tom






  #2  
Old September 24th, 2004, 04:21 PM
Jeff Conrad
external usenet poster
 
Posts: n/a
Default

Hi Tom,

Are you trying to open up a form in Datasheet View from the
bulit-in Access Switchboard Manager?

If so, 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
launched from the Switchboard 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.

--
Jeff Conrad
Access Junkie
Bend, Oregon

"Tom" wrote in message ...
I have been using the "Switchboard" (I believe it's used in Northwind.mdb)
for a while now.

One of my forms needs to open in "Datasheet" view. When the form is linked
to one of the menu buttons, it opens in "Single Form" view. I don't want
that.

Does anyone know how I can it can be opened (via Switchboard menu button) in
Datasheet view?

Thanks,
Tom



  #3  
Old September 27th, 2004, 02:06 PM
Tom
external usenet poster
 
Posts: n/a
Default

Jeff:

Thanks, that works great!!! I appreciat your feedback.

Tom


"Jeff Conrad" wrote in message
...
Hi Tom,

Are you trying to open up a form in Datasheet View from the
bulit-in Access Switchboard Manager?

If so, 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
launched from the Switchboard 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.

--
Jeff Conrad
Access Junkie
Bend, Oregon

"Tom" wrote in message

...
I have been using the "Switchboard" (I believe it's used in

Northwind.mdb)
for a while now.

One of my forms needs to open in "Datasheet" view. When the form is

linked
to one of the menu buttons, it opens in "Single Form" view. I don't

want
that.

Does anyone know how I can it can be opened (via Switchboard menu

button) in
Datasheet view?

Thanks,
Tom





  #4  
Old September 27th, 2004, 06:00 PM
Jeff Conrad
external usenet poster
 
Posts: n/a
Default

You're welcome, glad to help.

--
Jeff Conrad
Access Junkie
Bend, Oregon

"Tom" wrote in message ...
Jeff:

Thanks, that works great!!! I appreciat your feedback.

Tom


"Jeff Conrad" wrote in message
...
Hi Tom,

Are you trying to open up a form in Datasheet View from the
bulit-in Access Switchboard Manager?

If so, 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
launched from the Switchboard 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.

--
Jeff Conrad
Access Junkie
Bend, Oregon

"Tom" wrote in message

...
I have been using the "Switchboard" (I believe it's used in

Northwind.mdb)
for a while now.

One of my forms needs to open in "Datasheet" view. When the form is

linked
to one of the menu buttons, it opens in "Single Form" view. I don't

want
that.

Does anyone know how I can it can be opened (via Switchboard menu

button) in
Datasheet view?

Thanks,
Tom







 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Switchboard form views Garry New Users 4 July 14th, 2004 08:22 PM
code method to switch views scott Using Forms 4 July 7th, 2004 11:19 PM
Bug: print preview in form datasheet with server filter on crashes access (ADP A2002 SP3) Eric Cárdenas [MSFT] Using Forms 4 June 24th, 2004 08:38 AM
disable datasheet view in form John Milbury-Steen Using Forms 3 June 10th, 2004 03:45 PM


All times are GMT +1. The time now is 11:33 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.