Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2006

Tip: Looking for answers? Try searching our database.

Switchboard Hyperlink Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JanetF - 10 Jan 2006 18:37 GMT
Hello,

I have a standard switchboard that I created with the Switchboard Manager.  
One of the buttons I have on it is supposed to be a hyperlink to another
database.  I tried to create it by choosing the command "Run Code" in the
Switchboard Item box, and typed the function name "OpenReportDb ().  

The function "OpenReportDb" is in a module and is as follows:

Function OpenReportDb()
On Error GoTo OpenReportDb
   
Application.FollowHyperlink "P:\Pharmacy\report_tacl\Reports\reports.mdb"
     
Exit_OpenReportDb:
   Exit Function
   
Err_OpenReportDb:

       MsgBox Error$, 16, Prog$
       Resume Exit_OpenReportDb

End Function

But when I then try to use that option button on the switchboard, it tells
me it cannot find the procedure "OpenReportDB ()".  Any idea why this isn't
working?

Thank you in advance.

Janet
Jeff Conrad - 10 Jan 2006 19:30 GMT
Hi Janet,

Two things you need to correct.

1. Re-run the SBM and then in the Function box
for this option just enter

OpenReportDb

That's it, nothing else. No () symbols.

2. The second line of your code says this:

> On Error GoTo OpenReportDb

You need to change that to match your actual Error Handler:

On Error GoTo Err_OpenReportDb

That should do it.
Signature

Jeff Conrad
Access Junkie - MVP
http://home.bendbroadband.com/conradsystems/accessjunkie.html
http://www.access.qbuilt.com/html/articles.html

> Hello,
>
[quoted text clipped - 27 lines]
>
> Janet
JanetF - 10 Jan 2006 19:55 GMT
Hi Jeff,

I did what you suggested and I still get the same error message.

Janet

> Hi Janet,
>
[quoted text clipped - 48 lines]
> >
> > Janet
Jeff Conrad - 10 Jan 2006 20:33 GMT
Worked just fine in my test.

Are you absolutely sure you do not have quotes or () in the Switchboard entry?
The only thing that should be there is:

OpenReportDb

Which Access version are you using?

Try changing this line:

Function OpenReportDb()

to

Public Function OpenReportDb()

Compile your code, and then test again.
Signature

Jeff Conrad
Access Junkie - MVP
http://home.bendbroadband.com/conradsystems/accessjunkie.html
http://www.access.qbuilt.com/html/articles.html

> Hi Jeff,
>
> I did what you suggested and I still get the same error message.
JanetF - 10 Jan 2006 21:39 GMT
Jeff,

I change the name of the function to Public Function, then deleted the
button on my switchboard and recreated it.  Now it works!  Thanks very much
for your help.

Janet

> Worked just fine in my test.
>
[quoted text clipped - 18 lines]
> >
> > I did what you suggested and I still get the same error message.
Jeff Conrad - 10 Jan 2006 22:59 GMT
Cool, glad you have it working now!

Signature

Jeff Conrad
Access Junkie - MVP
http://home.bendbroadband.com/conradsystems/accessjunkie.html
http://www.access.qbuilt.com/html/articles.html

> Jeff,
>
> I change the name of the function to Public Function, then deleted the
> button on my switchboard and recreated it.  Now it works!  Thanks very much
> for your help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.