Open a form in filter by form datasheet view from Switchboard

G

Guest

I have created a form that opens in the filter by form datasheet view
perfectly. However, when I added the form to the Switchboard it does not open
in datasheet view.

I have tried using a macro from the Switchboard to open the form.
Unsuccessful.

I have tried creating a form to open the filter by form from the
Switchboard. Unsuccessful.

Is it possible to open a 'filter by form' form from the Switchboard in
datasheet view?
 
F

FP1

I have created a form that opens in the filter by form datasheet view
perfectly. However, when I added the form to the Switchboard it does
not open in datasheet view.

I have tried using a macro from the Switchboard to open the form.
Unsuccessful.

I have tried creating a form to open the filter by form from the
Switchboard. Unsuccessful.

Is it possible to open a 'filter by form' form from the Switchboard
in datasheet view?

It would have been appropriate for you to tell us "HOW" you are trying
to open the form in datasheet view. We can only guess.

To open a form in datasheet view using code, regardless of the form's
Default View, you MUST specifiy datasheet view.
DoCmd.OpenForm "FormName", acFormDS

If you are using an unbound form with command buttons, simply change
the Click event code to the above, substituting the actual form name.

However, if you used the Access Switchboard Manager to create the
switchboard, you can edit the Sub HandleButtonClick Switchboard code
to add another constant to the list. Use whatever value of the number
of constants already listed is, plus 1. I just don't remember if there
are 8 or 9 originally, so let's say your application currently shows 9
constants.
Add to that list:
Const conCmdOpenFormDS = 10

Then down in the Function HandleButtonClick event, add, just before
the Case Else statement:

Case conCmdOpenFormDS
DoCmd.OpenForm rsl[Argument], acFormDS

Then run the switchboard manager.
Add a new item to the page you wish it to appear on.
Use either of the 2 OpenForm commands (Add or Edit).
Enter the Form Name you wish to open in DataSheet.
Close the manager.
Open the Switchboard Items table.
Change the Command value for the form you wish to open from either 2
or 3 to 10.

I think I've remembered everything.

You will not be able to edit this item using the Manager.
It's a Pain. Best to use an unbound form with command buttons in place
of the Switchboard Manager. It's much, much easier to maintain and
modify.

Maybe I'm being naive, but woould it be easier to just a sub in a code
module that opens the form?
 
F

fredg

I have created a form that opens in the filter by form datasheet view
perfectly. However, when I added the form to the Switchboard it does not open
in datasheet view.

I have tried using a macro from the Switchboard to open the form.
Unsuccessful.

I have tried creating a form to open the filter by form from the
Switchboard. Unsuccessful.

Is it possible to open a 'filter by form' form from the Switchboard in
datasheet view?

It would have been appropriate for you to tell us "HOW" you are trying
to open the form in datasheet view. We can only guess.

To open a form in datasheet view using code, regardless of the form's
Default View, you MUST specifiy datasheet view.
DoCmd.OpenForm "FormName", acFormDS

If you are using an unbound form with command buttons, simply change
the Click event code to the above, substituting the actual form name.

However, if you used the Access Switchboard Manager to create the
switchboard, you can edit the Sub HandleButtonClick Switchboard code
to add another constant to the list. Use whatever value of the number
of constants already listed is, plus 1. I just don't remember if there
are 8 or 9 originally, so let's say your application currently shows 9
constants.
Add to that list:
Const conCmdOpenFormDS = 10

Then down in the Function HandleButtonClick event, add, just before
the Case Else statement:

Case conCmdOpenFormDS
DoCmd.OpenForm rsl[Argument], acFormDS

Then run the switchboard manager.
Add a new item to the page you wish it to appear on.
Use either of the 2 OpenForm commands (Add or Edit).
Enter the Form Name you wish to open in DataSheet.
Close the manager.
Open the Switchboard Items table.
Change the Command value for the form you wish to open from either 2
or 3 to 10.

I think I've remembered everything.

You will not be able to edit this item using the Manager.
It's a Pain. Best to use an unbound form with command buttons in place
of the Switchboard Manager. It's much, much easier to maintain and
modify.
 
F

fredg

I have created a form that opens in the filter by form datasheet view
perfectly. However, when I added the form to the Switchboard it does
not open in datasheet view.

I have tried using a macro from the Switchboard to open the form.
Unsuccessful.

I have tried creating a form to open the filter by form from the
Switchboard. Unsuccessful.

Is it possible to open a 'filter by form' form from the Switchboard
in datasheet view?

It would have been appropriate for you to tell us "HOW" you are trying
to open the form in datasheet view. We can only guess.

To open a form in datasheet view using code, regardless of the form's
Default View, you MUST specifiy datasheet view.
DoCmd.OpenForm "FormName", acFormDS

If you are using an unbound form with command buttons, simply change
the Click event code to the above, substituting the actual form name.

However, if you used the Access Switchboard Manager to create the
switchboard, you can edit the Sub HandleButtonClick Switchboard code
to add another constant to the list. Use whatever value of the number
of constants already listed is, plus 1. I just don't remember if there
are 8 or 9 originally, so let's say your application currently shows 9
constants.
Add to that list:
Const conCmdOpenFormDS = 10

Then down in the Function HandleButtonClick event, add, just before
the Case Else statement:

Case conCmdOpenFormDS
DoCmd.OpenForm rsl[Argument], acFormDS

Then run the switchboard manager.
Add a new item to the page you wish it to appear on.
Use either of the 2 OpenForm commands (Add or Edit).
Enter the Form Name you wish to open in DataSheet.
Close the manager.
Open the Switchboard Items table.
Change the Command value for the form you wish to open from either 2
or 3 to 10.

I think I've remembered everything.

You will not be able to edit this item using the Manager.
It's a Pain. Best to use an unbound form with command buttons in place
of the Switchboard Manager. It's much, much easier to maintain and
modify.

Maybe I'm being naive, but woould it be easier to just a sub in a code
module that opens the form?

Naive? Not at all. Code in a Sub or Macro would work.
I was just attempting to show that the built in switchboard was not a
user friendly method of navigating around in Access. A similar process
would be needed anytime the user wanted to use the built-in
switchboard to run a query.

To paraphrase what has been stated before by one of the Access MVP's,
the built in switchboard is a complicated solution to an easy problem.
 
G

Guest

Thanks so much for the information. I haven't quite got this to work, but I
did create an unbound form to open from the switchboard which will open the
bound form I want in datasheet view. I still want to work with what you have
provided so I will have alternate ways of opening forms in datasheet view.

fredg said:
I have created a form that opens in the filter by form datasheet view
perfectly. However, when I added the form to the Switchboard it does not open
in datasheet view.

I have tried using a macro from the Switchboard to open the form.
Unsuccessful.

I have tried creating a form to open the filter by form from the
Switchboard. Unsuccessful.

Is it possible to open a 'filter by form' form from the Switchboard in
datasheet view?

It would have been appropriate for you to tell us "HOW" you are trying
to open the form in datasheet view. We can only guess.

To open a form in datasheet view using code, regardless of the form's
Default View, you MUST specifiy datasheet view.
DoCmd.OpenForm "FormName", acFormDS

If you are using an unbound form with command buttons, simply change
the Click event code to the above, substituting the actual form name.

However, if you used the Access Switchboard Manager to create the
switchboard, you can edit the Sub HandleButtonClick Switchboard code
to add another constant to the list. Use whatever value of the number
of constants already listed is, plus 1. I just don't remember if there
are 8 or 9 originally, so let's say your application currently shows 9
constants.
Add to that list:
Const conCmdOpenFormDS = 10

Then down in the Function HandleButtonClick event, add, just before
the Case Else statement:

Case conCmdOpenFormDS
DoCmd.OpenForm rsl[Argument], acFormDS

Then run the switchboard manager.
Add a new item to the page you wish it to appear on.
Use either of the 2 OpenForm commands (Add or Edit).
Enter the Form Name you wish to open in DataSheet.
Close the manager.
Open the Switchboard Items table.
Change the Command value for the form you wish to open from either 2
or 3 to 10.

I think I've remembered everything.

You will not be able to edit this item using the Manager.
It's a Pain. Best to use an unbound form with command buttons in place
of the Switchboard Manager. It's much, much easier to maintain and
modify.
 
G

Guest

Fred, it works! I successfully implemented the instructions you provided.
Thank you so much.
 

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