Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Type mismatch
Message
From
15/07/2000 12:21:43
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
Type mismatch
Miscellaneous
Thread ID:
00392884
Message ID:
00392884
Views:
69
I use DAO 3.6 object library and want to compact the MDB by using the following codes, but the "Type mismatch" error message occurs.. anybody can help me please ..

Private Sub CompactMDB()
Dim mApp as String
Dim mCompactApp as String

mApp = "C:\TeCS.MDB"
mCompactApp = "C:\MyCompact.MDB"

Dim errLoop As Error
Dim IsFile As Boolean
On Error GoTo Err_Compact
DBEngine.CompactDatabase mApp, mCompactApp, , dbEncrypt + dbVersion70
On Error GoTo 0
Exit Sub
Err_Compact:
For Each errLoop In DBEngine.Errors
mErr = True
Message "Compact unsuccessful!" & vbCr & _
"Error number: " & errLoop.Number & _
vbCr & errLoop.Description
Next errLoop
End Sub
Reply
Map
View

Click here to load this message in the networking platform