A2007 - Error 3709 - The search key was not found in any record

H

harmi

Hi NG,

i'm trying to get my from A97 to A2000 converted applications running
under A2007.
When trying to attach a table through this ever since existing
routine,
after the docmd.transferdatabase-Statement stops with the error-
message mentioned above


Sub ATTACH_TABLE__(xSourceMDB, xSourceTable, xTargetTable)

' Delete Table if still existing:
' --------------------------------
On Error GoTo Error_DELETING_TABLE_1
DoCmd.DeleteObject A_TABLE, xTargetTable
On Error GoTo 0

' Attach table:
' -------------
On Error GoTo Error_ATTACHING_TABLE_2
DoCmd.TransferDatabase acLink, "Microsoft Access", xSourceMDB,
acTable, xSourceTable, xTargetTable
On Error GoTo 0
Exit Sub

Error_DELETING_TABLE_1:
Select Case err.Number
Case 7874 'Couldn't find object
Resume Next
End Select
MsgBox err.Number & Chr(13) & Error & Chr(13) & "While trying to
attach table!"
Exit Sub

Error_ATTACHING_TABLE_2:
MsgBox err.Number & Chr(13) & Error & Chr(13) & "While trying to
attach table!"
Exit Sub

End Sub

Any ideas, what could be the problem? Thanks in advance!
Harmi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top