run code from switchboard

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

I want to be able to click a button on the switchboard,
which is managed by the switchboard mangager, and have it
open a form and assign the correct record sourse. Is
there anyway to do that.
 
I want to be able to click a button on the switchboard,
which is managed by the switchboard mangager, and have it
open a form and assign the correct record sourse. Is
there anyway to do that.

You've already stated your answer in the subject line.
Run code. That is one of the menu options available.
Without more information, this is the best I can do for you.
 
How do I save a block of code as a function

A Function? or a Procedure?
A function is used to return a value.

Function Increase()
Dim intValue as integer
IntValue = forms!FormName!ControlName
Increase = intValue * 10
End Function


A procedure is used to do something.

Public Sub OpenAForm()
Dim strForm as String
strForm = InputBox("What Form")
DoCmd.OpenForm strForm
End Sub

On the main database folder, click on Modules + New.
Click on Insert. enter the name of a procedure.
Write the procedure.
Save it.

Open the Switchboard manager.
Edit the switchboard item command to "Run Code".
Write the procedure name in the Function Name box.
 
Back
Top