Runtime error - 2147221164 (80040154) class not registered

L

ljb752002

When I select 'debug' the set con=Application.CurrentProject.Connection is
highlighted in yellow.

' 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

Can anyone help with this problem please???
 
D

David Lloyd

The following KB article deals with the error message you are receiving.
There is not enough information to know whether it is applicable to your
case, however, I thought I would pass it along.

http://support.microsoft.com/default.aspx?scid=kb;en-us;298355

If this does not address your issue, you may want to post more of the code,
including how you are dimensioning your variables, etc. Other useful
information would include the version of Access you are running, service
packs, and what references you are using in your project.

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


When I select 'debug' the set con=Application.CurrentProject.Connection is
highlighted in yellow.

' 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

Can anyone help with this problem please???
 
Top