Hello,
I have a database at c:boyscoutsboyscouts.mdb and I also
have the same database on a floppy. I am using the
transfer database to send a table-tblawardsreceivedden, to
the database on the floppy. I need to delete the table on
the floppy before importing it to the floppy with the new
data. I am getting an error that the table can’t be found
or the spelling of the table is wrong. I can’t figure out
my problem. I had the transfer working until I realized
the table wasn’t being deleted and the records were just
being duplicated.
Here is my code:
‘———————————————————-
—
‘ macexpawardsorder
‘
‘———————————————————-
—
Function macexpawardsorder()
On Error GoTo macexpawardsorder_Err
Dim db As Database
Dim ws As Workspace
Set ws = DBEngine(0)
Set db = ws.OpenDatabase(“A:boyscouts.mdb”)
If “a:boyscouts.mdbtblawardsreceivedden” “” then
DoCmd.DeleteObject
acTable, “tblawardsreceivedden”
End If
‘Set ws = DBEngine(0)
Set db = ws.OpenDatabase(“c:boyscoutsboyscouts.mdb”)
‘DoCmd.DeleteObject acTable, “tblawardsreceivedden”
DoCmd.TransferDatabase acExport, “Microsoft
Access”, “a:boyscouts.mdb”, acTable, _
“tblawardsreceived”, “tblawardsreceivedden”, False
MsgBox “Transfer Complete, Remove Disk When Light on
Your Floppy Drive Goes Out”, vbOK, “Mike’s Message”
macexpawardsorder_Exit:
Exit Function
macexpawardsorder_Err:
MsgBox Error$
Resume macexpawardsorder_Exit
End Function