Connecting Tech Pros Worldwide Forums | Help | Site Map

Forms and the Switchboard

aaaaaa
Guest
 
Posts: n/a
#1: Nov 12 '05
Hi,
I created some forms and during the wizard I chose the Datasheet View,
and when I open the forms from the main objects window they open up in
datasheet view. But when I created a switchboard which opens the same
form it doesnt load them in datasheet, it loads them in other, columnar
(me thinks), view.


Is there a way to make the switchboard load these forms in a simple
datasheet view

Thanks

rkc
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Forms and the Switchboard



"aaaaaa" <aaaa@ntlworld.com> wrote in message
news:ngUEb.21568$R6.4486875@newsfep2-win.server.ntli.net...[color=blue]
> Hi,
> I created some forms and during the wizard I chose the Datasheet View,
> and when I open the forms from the main objects window they open up in
> datasheet view. But when I created a switchboard which opens the same
> form it doesnt load them in datasheet, it loads them in other, columnar
> (me thinks), view.
>
>
> Is there a way to make the switchboard load these forms in a simple
> datasheet view[/color]

If you go into design view of the switchboard form and take a look
at the code behind it you will see that the forms are opened using
DoCmd.OpenForm with no argument for veiw type. Since there
is no argument supplied, the view defaults to form view. This is true
even if the form is set to datasheet-true and allow form view-false in
it's own property sheet.

You may have to edit the switchboard code if you want a form to
open in datasheet view.



fredg
Guest
 
Posts: n/a
#3: Nov 12 '05

re: Forms and the Switchboard


aaaaaa wrote:
[color=blue]
> Hi,
> I created some forms and during the wizard I chose the Datasheet View,
> and when I open the forms from the main objects window they open up in
> datasheet view. But when I created a switchboard which opens the same
> form it doesnt load them in datasheet, it loads them in other, columnar
> (me thinks), view.
>
>
> Is there a way to make the switchboard load these forms in a simple
> datasheet view
>
> Thanks[/color]
If it a switchboard you created using an unbound form with command
buttons, you must specify Datasheet view in the OpenForm argument:
DoCmd.OpenForm "FormName", acFormDS

If the switchboard is one created using the Access Switchboard wizard,
there is quite a bit more work you must do. Post back if this is the
switchboard used and I'll dig out the information for you.


--
Fred
Please reply only to this newsgroup.
I do not respond to personal e-mail.
Terry
Guest
 
Posts: n/a
#4: Nov 12 '05

re: Forms and the Switchboard


"rkc" <rkc@yabba.dabba.do.rochester.rr.nope> wrote in message news:<A9ZEb.38958$JW3.2990@twister.nyroc.rr.com>.. .[color=blue]
> "aaaaaa" <aaaa@ntlworld.com> wrote in message
> news:ngUEb.21568$R6.4486875@newsfep2-win.server.ntli.net...[color=green]
> > Hi,
> > I created some forms and during the wizard I chose the Datasheet View,
> > and when I open the forms from the main objects window they open up in
> > datasheet view. But when I created a switchboard which opens the same
> > form it doesnt load them in datasheet, it loads them in other, columnar
> > (me thinks), view.
> >
> >
> > Is there a way to make the switchboard load these forms in a simple
> > datasheet view[/color]
>
> If you go into design view of the switchboard form and take a look
> at the code behind it you will see that the forms are opened using
> DoCmd.OpenForm with no argument for veiw type. Since there
> is no argument supplied, the view defaults to form view. This is true
> even if the form is set to datasheet-true and allow form view-false in
> it's own property sheet.
>
> You may have to edit the switchboard code if you want a form to
> open in datasheet view.[/color]

I also would like to know the answer to this. How do we go about
'editing the switchboard code' to make it load in datasheet view?

Terry
Salad
Guest
 
Posts: n/a
#5: Nov 12 '05

re: Forms and the Switchboard


fredg wrote:
[color=blue]
> aaaaaa wrote:
>[color=green]
> > Hi,
> > I created some forms and during the wizard I chose the Datasheet View,
> > and when I open the forms from the main objects window they open up in
> > datasheet view. But when I created a switchboard which opens the same
> > form it doesnt load them in datasheet, it loads them in other, columnar
> > (me thinks), view.
> >
> >
> > Is there a way to make the switchboard load these forms in a simple
> > datasheet view
> >
> > Thanks[/color]
> If it a switchboard you created using an unbound form with command
> buttons, you must specify Datasheet view in the OpenForm argument:
> DoCmd.OpenForm "FormName", acFormDS
>
> If the switchboard is one created using the Access Switchboard wizard,
> there is quite a bit more work you must do. Post back if this is the
> switchboard used and I'll dig out the information for you.[/color]

It's make more sense, if it's added work, to follow your Docmd example by
placing it into a module as a function and call the Form by running code or a
macro,


Terry
Guest
 
Posts: n/a
#6: Nov 12 '05

re: Forms and the Switchboard


"rkc" <rkc@yabba.dabba.do.rochester.rr.nope> wrote in message news:<A9ZEb.38958$JW3.2990@twister.nyroc.rr.com>.. .[color=blue]
> "aaaaaa" <aaaa@ntlworld.com> wrote in message
> news:ngUEb.21568$R6.4486875@newsfep2-win.server.ntli.net...[color=green]
> > Hi,
> > I created some forms and during the wizard I chose the Datasheet View,
> > and when I open the forms from the main objects window they open up in
> > datasheet view. But when I created a switchboard which opens the same
> > form it doesnt load them in datasheet, it loads them in other, columnar
> > (me thinks), view.
> >
> >
> > Is there a way to make the switchboard load these forms in a simple
> > datasheet view[/color]
>
> If you go into design view of the switchboard form and take a look
> at the code behind it you will see that the forms are opened using
> DoCmd.OpenForm with no argument for veiw type. Since there
> is no argument supplied, the view defaults to form view. This is true
> even if the form is set to datasheet-true and allow form view-false in
> it's own property sheet.
>
> You may have to edit the switchboard code if you want a form to
> open in datasheet view.[/color]


I've found a solution! Edit the switchboard code as follows:

Open switchboard in Design View, click on Code in the toolbar, scroll
down to 'Open a form, change the code from:

DoCmd.OpenForm rs![Argument]
to:

DoCmd.OpenForm rs![Argument], acFormDS

This works on my 2K Access.

Terry
Salad
Guest
 
Posts: n/a
#7: Nov 12 '05

re: Forms and the Switchboard


Terry wrote:
[color=blue]
> I've found a solution! Edit the switchboard code as follows:
>
> Open switchboard in Design View, click on Code in the toolbar, scroll
> down to 'Open a form, change the code from:
>
> DoCmd.OpenForm rs![Argument]
> to:
>
> DoCmd.OpenForm rs![Argument], acFormDS
>
> This works on my 2K Access.
>
> Terry[/color]

Instead of messing with the switchboard code Much easier to follow and cleaner. Few people need or want to mess
with the generated switchboard code. And if you even need to rebuild it you may forget to add the DS again.


Sald
Guest
 
Posts: n/a
#8: Nov 12 '05

re: Forms and the Switchboard


Salad wrote:
[color=blue]
> Terry wrote:
>[color=green]
> > I've found a solution! Edit the switchboard code as follows:
> >
> > Open switchboard in Design View, click on Code in the toolbar, scroll
> > down to 'Open a form, change the code from:
> >
> > DoCmd.OpenForm rs![Argument]
> > to:
> >
> > DoCmd.OpenForm rs![Argument], acFormDS
> >
> > This works on my 2K Access.
> >
> > Terry[/color]
>
> Instead of messing with the switchboard code Much easier to follow and cleaner. Few people need or want to mess
> with the generated switchboard code. And if you even need to rebuild it you may forget to add the DS again.[/color]

I meant to say use RUN MACRO or RUN CODE in the switchboard.


Closed Thread