Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...This was the ONLY place that I could find information that I could use to resolve the problem. So thanks once again to member TomSark and the SQL forum!..."

Geography

Where in the world do Tek-Tips members come from?
hedgracer (Programmer)
11 Jul 12 14:25
I have the following line in vba in access 2007:

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Floor_Execution_Import", str, True, "B4:H30"

The format of the data in the .xslx is as follows:


ELECTRONIC
Date ELECTRONIC Ticket # Account # B/S Quantity Month Product
Tuesday, July 10,2012
electronic 245 48795849 b 1 q lh
electronic 621 25212375 s 1 z yc
electronic 2 61533013 b 1 q s
electronic 246 25212375 b 1 z yc

The range includes only the data starting at electronic and ending at yc (obviously including a few extra rows in case the user has more information). Unfortunately, when I try to import it into the SQL Server 2008 R2 table I get the following error:

Run-time error '2391':
Field'245' doesn't exist in destination table 'Floor_Execution_Import'.

The table Floor_Execution_Import has the following fields:

Electronic varchar(50)
Ticket varchar(50)
Account varchar(50)
BS varchar(50)
Quantity varchar(50)
Month varchar(50)
Product varchar(50)

I really cannot see why this error message is being produced. Can anyone help me on this one? Any help is appreciated. Thanks.

Dave


SkipVought (Programmer)
11 Jul 12 14:34


Your table data is hard to understand.

Why don't you have the DATE on each line in the Excel Table? I only see ONE DATE (Tuesday, July 10,2012) and I assume that this is a REAL DATE and not just TEXT.

Doesn't your Excel Table have 1) ROW 1 HEADERS and 2) ROW 2 and following have DATA

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close