Hi, I have this code to find tables already in my DB and delete them if found.
When I use my program in my laptop it works peferectly
when I use it in my supervisor's laptop it doesnt as it pops up a message box saying invalid argument or proccedure......
any idea on what is going on? is it a library or smth??
desperate for help.....Thanks
When I use my program in my laptop it works peferectly
when I use it in my supervisor's laptop it doesnt as it pops up a message box saying invalid argument or proccedure......
any idea on what is going on? is it a library or smth??
desperate for help.....Thanks
Code:
Dim OBJ As AccessObject, DBS As Object
Set DBS = Application.CurrentData
' Search for open AccessObject objects in AllTables collection and delete
For Each OBJ In DBS.AllTables
If OBJ.Name = "IODB" Then
'Table was found, ask user what to do
UserResponse = MsgBox("Another Wire Table Was Found. Do You Wish To Replace it with Your File?", vbOKCancel, "Table Found")
If UserResponse = 2 Then 'User Response is Cancel
MsgBox ("Update IO Table was Cancelled!!!")
Exit Sub
ElseIf UserResponse = 1 Then 'User Response is ok. Then delete and transfer new table
DoCmd.DeleteObject acTable, "IODB"
End If
Else
End If
Next OBJ