If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Switchboard
Is there a way to go to a specific switchboard page and item (SwitchboardID
and ItemNumber) from code? If so, can you help me with some sample code? Thanks, Mike from Moriches |
#2
|
|||
|
|||
Switchboard
Hi Mike
Can you give more details as not really sure what it is you are trying to do. -- Wayne Manchester, England. "Mike from Moriches" wrote: Is there a way to go to a specific switchboard page and item (SwitchboardID and ItemNumber) from code? If so, can you help me with some sample code? Thanks, Mike from Moriches |
#3
|
|||
|
|||
Switchboard
"Wayne-I-M" wrote in message ... Hi Wayne My switchboard has many pages. One item on the main page, "Lease Management" goes to a menu of lease management items, lets assume on page two of the switchboard. When I start up the database, I run a routine that checks for leases expiring within 10 days, before the main switchboard displays. If none exist, clicking command button brings up the switchboard, no problem. if a lease is expiring, I would like a command button to take me to item 3 on page two of the switchboard, which opens a form pertaining to leases. I hope I didn't confuse you. Thanks for your interest. Mike Hi Mike Can you give more details as not really sure what it is you are trying to do. -- Wayne Manchester, England. "Mike from Moriches" wrote: Is there a way to go to a specific switchboard page and item (SwitchboardID and ItemNumber) from code? If so, can you help me with some sample code? Thanks, Mike from Moriches |
#4
|
|||
|
|||
Switchboard
Instead of trying to open the switchboard and get the item, why not just
open the form directly. Or open the switchboard and then open the form. If something = False Then Docmd.OpenForm "Switchboard" else Docmd.OpenForm "Switchboard" Docmd.OpenForm "Name of the form that you open with switchboard" End if Doing it with the switchboard is a bit more complex. To open the switchboard to a specific page you can use the following, where OpenArgs is the number of the switchboard page. DoCmd.OpenForm FormName:="Switchboard", OpenArgs:="3" You also need to modify the code in the switchboard's open event Dim strSwitchBoardId As String If IsNull(Me.OpenArgs) Then strSwitchBoardId = "Default" Else strSwitchBoardId = Me.OpenArgs End If ' Move to the switchboard page that is marked as the default. Me.Filter = "[ItemNumber] = 0 AND [Argument] = '" & strSwitchBoardId & "'" Me.FilterOn = True Then you need to change the HandleButtonClick from a Private to a Public procedure so you can call it; Replace twh word Private with the word Public. Then you can call the handle button click code with Forms!Switchboard.HandleButtonClick(1) - for button 1, -- John Spencer Access MVP 2002-2005, 2007 Center for Health Program Development and Management University of Maryland Baltimore County .. "Mike from Moriches" wrote in message ... "Wayne-I-M" wrote in message ... Hi Wayne My switchboard has many pages. One item on the main page, "Lease Management" goes to a menu of lease management items, lets assume on page two of the switchboard. When I start up the database, I run a routine that checks for leases expiring within 10 days, before the main switchboard displays. If none exist, clicking command button brings up the switchboard, no problem. if a lease is expiring, I would like a command button to take me to item 3 on page two of the switchboard, which opens a form pertaining to leases. I hope I didn't confuse you. Thanks for your interest. Mike Hi Mike Can you give more details as not really sure what it is you are trying to do. -- Wayne Manchester, England. "Mike from Moriches" wrote: Is there a way to go to a specific switchboard page and item (SwitchboardID and ItemNumber) from code? If so, can you help me with some sample code? Thanks, Mike from Moriches |
Thread Tools | |
Display Modes | |
|
|