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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database cleanup by import loses something

Status
Not open for further replies.

gymbeef

Technical User
Sep 18, 2002
33
0
0
US
A tip posted on one of the forums about cleaning up and reducing the size of your database file, suggested creating a new (blank) database, and importing all the objects from the application being developed. The import worked fine without errors and the new file is a third the size of the old file, and all the tables, forms, and modules look to be there OK. But the new database now runs with errors.

One of my modules has a routine:

Public Sub ClearFilename()
On Error GoTo Err_ClearFilename
Dim dbsDBS As Database
Dim rstASCII As Recordset
Set dbsDBS = CurrentDb....

which runs fine in the old database, but now when it gets to the "Dim dbsDBS As Database" line, I get a "User-defined type not defined" error. I get the error both when trying to run and trying to compile, and repair\compact doesn't remove the error.

What did I miss? Why did this pop up and how do I fix?

Thanks in advance.
 
Check your Tools->References. They are not imported with the objects.
 
Thanks Star, but your answer reveals a new wrinkle: The list of references is not the same!! I'm opening the databases with the same program on the same machine, but when I look at the references list for each database, there are some in the first that are not in the other, and vice versa.

Is it because I'm doing editing at different times on different machines or was it a result of converting the app from A-97 to A2k2 a while back? I do everything on A2k2, but some of the computers I use for editing are upgraded from A-97 and some installed fresh with A2k2. Some have the full Office complement, some just Access.

I can't make sure the new database has the same references checked as the old one because some of the choices I want are not in the new one's list. How do I get the missing references, or otherwise "commonize" my choices.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top