F
FatMan
Hello all:
I am wondering if anyone can help me the the follownig error:
Compile Error
User - defined type not defined
I get his error when I run my program and it stops on the following line of
code....
Dim Db As DAO.Database
The line of code is part of a procedure used to delete a table from a
different database. The full code is listsed below.
If anyone could please let me know what I am doing wrong I would greatly
appreciated it. Database and Code was created in Access 2000.
Thanks,
FatMan
Full Code....
Public Sub DeleteForeignData()
On Error GoTo Err_Handler
Dim Db As DAO.Database
Set Db = OpenDatabase("C:\Program Files\OCR Canada\OCRInv.mdb")
Db.Execute "Delete * from CollectedBatchData", dbFailOnError
Exit_Sub:
Db.Close
Set Db = Nothing
Exit Sub
Err_Handler:
MsgBox "Error #: " & Err.Number & " " & Err.Description
Resume Exit_Sub
End Sub
I am wondering if anyone can help me the the follownig error:
Compile Error
User - defined type not defined
I get his error when I run my program and it stops on the following line of
code....
Dim Db As DAO.Database
The line of code is part of a procedure used to delete a table from a
different database. The full code is listsed below.
If anyone could please let me know what I am doing wrong I would greatly
appreciated it. Database and Code was created in Access 2000.
Thanks,
FatMan
Full Code....
Public Sub DeleteForeignData()
On Error GoTo Err_Handler
Dim Db As DAO.Database
Set Db = OpenDatabase("C:\Program Files\OCR Canada\OCRInv.mdb")
Db.Execute "Delete * from CollectedBatchData", dbFailOnError
Exit_Sub:
Db.Close
Set Db = Nothing
Exit Sub
Err_Handler:
MsgBox "Error #: " & Err.Number & " " & Err.Description
Resume Exit_Sub
End Sub