Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compile Error from Switchboard after I Split DB

Status
Not open for further replies.

skin76

Technical User
Mar 4, 2003
25
US
I have split my DB, and when I go to the FE to open the swtichboard it give me an compile error: User-defined type not defined
and this where it lead me me.

Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.

Dim dbs As Database
Dim rst As Recordset

The Dim dbs As Database is highligted in Blue and the Private Sub Form_Open(Cancel As Integer)is highlited in Yellow

The only time I get this error when I create a blank DB and import the tables for my BE, then I creat another blank DB and import the queries, forms, reports,etc for my FE. While still in my FE I then import the switchboard and two table lookups into my FE and delete those tables from my BE. I then link my tables under the file menu and then I do a link Mananger once I place my FE at a local computer desktop. When I click on Switchboard I get the complie error message.

But when I use the DB splitter under tools everything works fine

Please Advise
 
Two things:
1 - ensure there's a reference to the Microsoft DAO 3.# Object Library (in VBE - Tools | References)
2 - i'd recommend explicit declaration of the dao objects:

[tt]Dim dbs As dao.Database
Dim rst As dao.Recordset[/tt]

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top