how do i get a macro/code to open a specific switchboard page

  • Thread starter Thread starter Booksbio15
  • Start date Start date
B

Booksbio15

hi

i have four switchboards (patient, staff, lists, accounts) with patient
being default

but i need to open the staff switchboard using either a macro or VBA

thanks
 
I assume by "switchboard", you are referring to an Access form which is
designed to function as a switchboard-type menu.

This line in a VBA procedure will open the specified form.

DoCmd.OpenForm "staff"

There are additional arguments which can be used to control how the form
opens. Search Access Help for more details.

Where and how you use this, of course, depends and where and how you want to
open the staff switchboard.

I suppose you can do this with a macro as well.
 
Switchboards are forms so you ought to be able to use the OpenForm method to
open the Staff switchboard. Put the following code in the Click event of a
button:
DoCmd.OpemForm "Staff"

This assumes the staff switchboard is named Staff.

Steve
(e-mail address removed)
 
Booksbio15 said:
hi

i have four switchboards (patient, staff, lists, accounts) with patient
being default

but i need to open the staff switchboard using either a macro or VBA

thanks
 

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

Similar Threads

Access Switchboard error message 1
Switchboard Minimized 4
Running a Macro on a switchboard 1
Switchboard Questions 2
SWITCHBOARD 1
Switchboard pages 5
Switchboard Compile Error 1
I've lost my Switchboard ! 3

Back
Top