DoCmd.Transferspreadsheet add extra blank rows

J

JDB

I use the following DoCmd statement to bring in an entire spreadsheet
tab. Works very well except is adds 2 extra blank rows to the top of
the table so always get a warning.

I have deleted all the remaining rows in the spreadsheet tab looking
for extra characters, but it continues to happen.

Any ideas how to prevent this??

Thanks

JDB
-----------------------------------------

DoCmd.TransferSpreadsheet transfertype:=acImport, SpreadsheetType:=8,
_
tablename:="tbl_Import_Albacora_Volumes", _
FileName:=strOne & strTwo, Hasfieldnames:=True

--------------------------------------
 
A

Alex Dybenko

Hi,
don't know why it happens, but you can delete these 2 rows after import,
running a simple delete query
You can also first import it into temporary table and then copy required
records to tbl_Import_Albacora_Volumes

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 
J

JDB

Thanks,
I run a query anyway to remove blank values rows, so not a real issue,
except I am getting a warning each time it happens. I don't get a
warning if I don't use a primary key.

jdb
 

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