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
 
Back
Top