473,327 Members | 2,025 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Switchboard error

I have developed a Microsoft Access 2003 database that opens a switchboard. On one computer it opens with no problem. On two others I receive the following error: "Method 'Connection' of object '_CurrentProject' failed." The error is referring to this line in the code: "Set con = CurrentProject.Connection". con is a variable defined as an object. It is needed because later this connection us used to open a recordset called from a SQL statement.

Why would this run fine on one computer and not on two others? Is there an update or patch that is interferring?

Here is the whole string:

Set con = CurrentProject.Connection
stSql = "SELECT * FROM [Switchboard Items]"
stSql = stSql & " WHERE [ItemNumber] > 0 AND [SwitchboardID]=" & Me![SwitchboardID]
stSql = stSql & " ORDER BY [ItemNumber];"
Set rs = CreateObject("ADODB.Recordset")
rs.Open stSql, con, 1 ' 1 = adOpenKeyset
Nov 10 '09 #1
5 2688
ajalwaysus
266 Expert 100+
Are the references identical across all 3 DBs?

-AJ
Nov 10 '09 #2
ChipR
1,287 Expert 1GB
Does it make any difference if you
Expand|Select|Wrap|Line Numbers
  1. Dim con As ADODB.Connection
Nov 10 '09 #3
It is not 3 different databases, it is the same database, being opened from a network drive, on 3 separate computers. There is no conflict as I am the only user opening the file.

I tried "dim con as ADODB.Connection" and that did not help. It resulted in the same error message.
Nov 10 '09 #4
ChipR
1,287 Expert 1GB
Have you tried the instructions in this Microsoft Support article? It mentions your problem specifically (switchboard), and was the first link on Google.
Nov 10 '09 #5
The Microsoft Support article did not work. Subsequently, I started having trouble with my new Office 2007 machine. It would not open template files, giving me a "could not be instantiated" error message. In my search for a solution to this one, I found that the Microsoft solution did not work. But, I found this post. The solution here fixed both my Access 2003 and Access 2007 issues.

http://www.pcreview.co.uk/forums/thread-3367578-3.php (post #28)
Dec 18 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Dannic | last post by:
Here is the application. Its a simple application really. I have a db created in Access 2000 which opens to a switchboard created by the switchboard manager. Now the problem. This only works...
9
by: Baz'noid | last post by:
Hi all, My computer has suddenly decided that it doesn't like the switchboard - it's quite happy to open up on other machines, meaning the database itself isn't at fault, it must be something...
2
by: Terry | last post by:
I have created a switchboard, created using Access 2000. If I put the mouse anywhere on the form, outside of the checkboxes and scroll the wheel backwards, I get the following error. Run-Time...
5
by: Michael Keene | last post by:
I have a query that I'd like to add to my switchboard, but when I use the switchboard manager I only get the option to run a report, a macro or open a form. Is there a way to add a query without...
0
by: Earl Anderson | last post by:
I copied a Household Inventory database template in A97 (WinXP) and modified it for use in my office. Modifications consisted of changing some table names, deleting some fields, adding some fields...
1
by: jimwlee | last post by:
Hi all, I mistakenly deleted my switchboard on the Object Forms view. I recreated it again with the database utility, but the switchboard isn't showing up in the forms view. Any ideas? Thanks in...
4
by: ghadley_00 | last post by:
Hi, Can anyone recommend a piece of VBA code I could attach to a button in a MS Form form that will close the current form and bring the switchboard to foreground. I'm trying to integrate a form...
6
by: keri | last post by:
Please help, i'm baffled. I have opened my db and recieved an error on this code which starts the switchboard. As i didn't write this code i'm baffled, and I don't think I have made any changes...
13
by: jsmith811 | last post by:
I setup a very simple database for a client, it has only one table. I have startup options set to open straight to the Switchboard, so users only see the Switchboard menu. The database has 3...
2
by: Earl Anderson | last post by:
In Acc2003, I have a situation in which I have a main switchboard and upon pressing one of its buttons , takes the user to another sub hierarchical switchboard. Pressing one of these buttons could...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.