Run Code Switchboard Command

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What is the format for identifying the code to use in a Run Code Switchboard
Command? I have several procedures that I can only get the switchboard to
call by setting up macros to call them and using the Switchboard Run Macro
Command. This seems rather silly to me, but whenever I try to use Run Code
and put in the name of a public function, I get a message that Access cannot
find the function. I am using Access 2003, but the database was originally
set up in Access 2000 if that makes any difference.
 
Amy Baggott said:
What is the format for identifying the code to use in a Run Code
Switchboard
Command? I have several procedures that I can only get the switchboard to
call by setting up macros to call them and using the Switchboard Run Macro
Command. This seems rather silly to me, but whenever I try to use Run
Code
and put in the name of a public function, I get a message that Access
cannot
find the function. I am using Access 2003, but the database was
originally
set up in Access 2000 if that makes any difference.
 
Amy Baggott said:
What is the format for identifying the code to use in a Run Code
Switchboard
Command? I have several procedures that I can only get the switchboard to
call by setting up macros to call them and using the Switchboard Run Macro
Command. This seems rather silly to me, but whenever I try to use Run
Code
and put in the name of a public function, I get a message that Access
cannot
find the function. I am using Access 2003, but the database was
originally
set up in Access 2000 if that makes any difference.
 
Amy Baggott said:
What is the format for identifying the code to use in a Run Code
Switchboard
Command? I have several procedures that I can only get the switchboard to
call by setting up macros to call them and using the Switchboard Run Macro
Command. This seems rather silly to me, but whenever I try to use Run
Code
and put in the name of a public function, I get a message that Access
cannot
find the function. I am using Access 2003, but the database was
originally
set up in Access 2000 if that makes any difference.
 
I'm just typing the name of the function into the field in the Switchboard
Manager
 
These are functions I wrote. The functions work fine, but the Switchboard
doesn't want to admit they exist.
 
I've tried it both with and without. I can call the functions fine from a
macro or from another VBA code procedure. It's only the Switchboard that's
being picky.
 
These are functions I wrote. The functions work fine, but the Switchboard
doesn't want to admit they exist.

Is the function placed in a Module?
Open your Switchboard Items table.
The RunCode command value is 8.
Find the record with the Switchboard number and command button number
you want to use. Enter an 8 as the command value for that record then
write the name of the sub procedure in that record's Argument field.
Do not include an = sign.

SwitchboardID ItemNumber ItemText Command Argument
1 3 ButtonCaption 8 RunUpdateQuery
 
That worked. I wonder why it worked typing it directly into the table when
it wouldn't work typing it into the wizard?
 

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

Back
Top