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

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
 
G

George Hepworth

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.
 
S

Steve

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)
 
D

De Jager

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

Top