Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Switchboard question 2

Status
Not open for further replies.

ziggs

Technical User
Sep 21, 2000
195
US
I have Access 97 and I want to add an item to an existing Switchboard. I made a form which basically shows an "Autoform:database" view. Thus, I see all rows when I click on this new form. However, when I add this to my switchboard, it will only show one row at a time.

Is there a way to select on an item in the switchboard and have it show all rows? If so, how? Thanks
 
Hi Ziggs,
You'll have to set your form (design view) Double-click on the little black square top left corner of the form screen and in its properties dialog check the "Default View" is set to continuous forms. Alternative to this you could have the Wiz make you a shiney new Tabular form...takes but a sec! Gord
ghubbell@total.net
 
Good info. However, there is a selection called Datasheet and that's exactly the appearance I'd like to see when the switchboard button activates this form. I don't really like the Continuous forms view.

So, is the Datasheet view possible upon activating a switchboard button? I could not get that to work.
 
That is a little devil! Monkeyed with this for a bit and have a solution for you:
Flip the switchboard in design view and go to its VB module (code button on tool bar). Find the Function called HandleButtonClick and add this right after Const conCmdOpenPage = 9

Const conCmdOpenTheFormDatasheet = 666

Now add this right after DoCmd.OpenForm Rs![Argument], , , , acFormAdd

Case conCmdOpenTheFormDatasheet
DoCmd.OpenForm Rs![Argument], acFormDS

Now this forces the nasty thing to open in datasheet view!

Any form you want to do this to, you will have to go to the switchboard items table and in the field "Command" type 666.

If you want to do the same and have it open for additions only, repeat as above:

Const conCmdOpenTheFormDatasheet = 123

Case conCmdOpenTheFormDatasheetAdd
DoCmd.OpenForm Rs![Argument], acFormDS,,,acFormAdd

Same deal with the table but with the number...123

I don't know how the switchboard wizard will like this but what the h'. You do this, you are the switchboard manager!
Gord
ghubbell@total.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top