Solved

Access 2007 switchboard as a menu bar/navigation pane on left hand side

Posted on 2013-01-28
7
1,100 Views
Last Modified: 2013-01-28
Hi,

I am developing a new system and would ideally like the switchboard to always be visible on the left hand side of the screen (about 4cm wide and cover from top to bottom).

When a new form is opened I would like this to open alongside the switchboard, NOT over the top of it, so the switchboard is still visible. The idea is for the user to be able to see all the buttons on the switchboard no matter what form they have opened so that they can open/close all the forms on the switchboard menu with ease.

As an extra, I intend to put code behind each button on the switchboard so that if a user has one form open and clicks a button to open another form it will close the currently open form first.

Is this possible in Access 2007?

Many thanks
0
Comment
Question by:andrewpiconnect
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 38826530
If you want to do this, your best bet would be to create a main form, then put your "switchboard" as a subform along the left side, and another subform on the right, to display the other forms you want to display.
0
 

Author Comment

by:andrewpiconnect
ID: 38826595
Hi,

Ive created a "Main Form", put a "Switchboard" as a subform on the left hand side with 2 buttons (to open 2 different forms) but how do i get the switchboard to open these 2 new forms as subforms within the main form?
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 38826655
Create the 2nd subform (we will call this sub_Main) on the main form, but don't assign it a SourceObject, probably set it's visible property to No (to prevent the user from seeing a big white block on the right side of the main form.

Then, when the user clicks one of the buttons in your "switchboard", set the SourceObject of the 2nd subform to the name of the form you want to use and set the visible property of the subform to Yes.

Private Sub cmd_Form1_Click

    me.parent.sub_Main.SourceObject = "frm_Form1"
    me.parent.sub_Main.visible = true

End Sub

You might want to consider using toggle buttons on your switchboard, and put them in a option group, so that only one one button can be "depressed" at a time, and to make it easier for your user to know which "form" they are currently using.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:andrewpiconnect
ID: 38826739
Here's what i have so far.

Entire Screen Form = frmSWBMain
Menu buttons form = frmSWBMenuSub

2 x different subforms i want to load are:
frmCustomers
frmAppointments

The below code seems to work fine and produce the desired results although I am a little miffed as to whether I have set the SourceObject correctly. Can you please check?

PS. I have set the frmAppointments to show by default when frmSWBMain is opened.

Private Sub cmdButton1_Click()
   
    Me.Parent.frmCustomers.SourceObject = "frmCustomers"
    Me.Parent.frmCustomers.Visible = True
    Me.Parent.frmAppointments.Visible = False
   
End Sub

Private Sub cmdButton2_Click()
   
    Me.Parent.frmAppointments.Visible = True
    Me.Parent.frmCustomers.Visible = False
   
End Sub
0
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 38826783
You only need one subform for all of the stuff on the right, give the subform control a name of something like "sub_Main"

Then, you would use:

me.parent.sub_Main.SourceObject = "frmCustomers"
me.parent.sub_Main.Visible = true

and

me.parent.sub_Main.sourceobject = "frmAppointments"
me.parent.sub_Main.visible = true

Actually, now that I think about it, why do you even need a subform for the switchboard controls?  Why not just put them on the main form?  If you need to, you could add a vertical line to set off the switchboard from the subform.  If you get rid of the "switchboard" subform, that syntax would be:

me.sub_Main.SourceObject = "frmCustomers"
me.sub_Main.Visibile = true
0
 

Author Comment

by:andrewpiconnect
ID: 38827149
Excellent stuff. Many many thanks.

I have taken your advice and used a single form (no subform for the swichtboard controls) and put the frmCustomers & frmAppointments into the main form.

Syntax used (as it may be helpful for others is:

Private Sub Toggle22_GotFocus()
   
    Me.sub_Main.SourceObject = "frmCustomers"
    Me.sub_Main.Visible = True
   
End Sub

Private Sub Toggle23_GotFocus()
   
    Me.sub_Main.SourceObject = "frmAppointments"
    Me.sub_Main.Visible = True
   
End Sub

Thanks again
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 38827277
glad to be of assistance.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question