Import Error in BE/FE Scenario

khurram7x

Registered User.
Local time
Today, 09:16
Joined
Mar 4, 2015
Messages
226
When I import from Excel to Access in a single database using VBA below, it works fine.

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12Xml, "tblBoQ", "c:\Import\BoQ.xlsx", True

... but then when I break the database FE/BE, I get the attached error.

Data type, field size, etc seems to be correct as it is working well in single database. I've 10 fields to import, so I'm getting error for all fields.

Is there a different procedure or set of commands when importing in FE/BE scenarios? What am I doing wrong please??

Thanks
 

Attachments

  • ImportError.JPG
    ImportError.JPG
    34.9 KB · Views: 105
No, the command is the same for split databases.

Likely to be one of 3 reasons for the issue.
1. The table is not attached.
2. In the split process, there has been a change in the table definition or a change in relationships.
3. There is an issue with the spreadsheet data. Does it work (the exact same file with the exact same data) with the single database?
 
It might seem obvious, but does tblBoQ contain a natural PK that is imported with your data? If that is the case, did you import the data, split the database, try to import the same data again and at this point get the error? i.e. the data you are trying to import is already in the database?
 
It might seem obvious, but does tblBoQ contain a natural PK that is imported with your data? If that is the case, did you import the data, split the database, try to import the same data again and at this point get the error? i.e. the data you are trying to import is already in the database?
Exactly it's not an error, it's a warning against dupes.
 
Thank you guys, got it working. There was an issue with PK/FK relationship. Figured it out by picking up the hints from your replies.

Bless you all!
 

Users who are viewing this thread

Back
Top Bottom