runtime error

N

NAS

Whenever I try to open a switchboard I get the following error:

Run-time error '-2147221164 (80040154)':

Class not registered

I have the option to end or debug and when I click debug it highlights the
last line in this code:

' Open the table of Switchboard Items, and find
' the first item for this Switchboard Page.
Set con = Application.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 <--this line here

This is causing a major work stoppage in my office and any help in this
matter would be greatly appreciated.
 
J

Jerry Whittle

Has anything changed lately?

Press Cntr + g to bring up the VBA window.

Go to Tools, References. Is anything marked as missing?

Next go to Debug, Compile and see if it finds any other errors.

If you don't find a missing reference, your best bet is to open up a recent
backup of the database and see if it has the same problem. If not, delete
both the Switchboard form AND Switchboard Items table from the problem
database. Then import those two items from the known good backup.
 

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

Top