troubleshooting Question

Editing Input from a TransferSpreadsheet command

Avatar of mlcktmguy
mlcktmguyFlag for United States of America asked on
Microsoft Access
9 Comments1 Solution598 ViewsLast Modified:
One of my clients is receving data from a business partner on a spreadhseet.  I have no say or control over this, it is a given.  

The first part of my app pops a file selection dialog that they use to select the spreadsheet to be imported.  All spreadhseets should have the same number of columns and column attributes (date, numeric, text  etc..)

As a result of my transferspreadsheet command, a table is created in my MDB.  I am trying to develop edit routines to run on the imported data.

Specifically I am want to edit a field that should contain a valid date.  I would like to point the client to any problem records as specifically as possible.

On the example spreadsheet the column 'DateOfOrder' is formatted as a date.  The contents of the first 3 rows of this column on the spreadhseet are valid dates, the 'DateOfOrder' cell on the 4th record contains the word "test".  apparently Excel doesn't make you enter a date into a cell formatted as date.

DateOfOrder
1/4/13
1/4/13
1/7/13
Test

When the new table is created as a result of the transferspreadsheet, the column "DateOfOrder' is set to type 'Text'.  The valid dates of the first three records appear as numbers (41278, 41278, 41281) instead of dates.

The issue:  Becuase of the column was imported as 'Text', even though only row 4 contains an invalid date, none of the first 3 columns are vaild dates either.

My edits would show "invalid date" errors on all 4 rows, when in reality only the fourth row is wrong.  This would be confusing to the client trying to research and correct any errors.

I am used to using import specs when importing comma delimited data to control the format that a particular column is imported as.  There is no such option, or at least none that I know of in the 'TrasnferSpreadsheet command.

Is there any solution to how this is being imported so I can be more specific in my edits to the client?  In reality the spreadsheets will contain hundreds of rows.  Telling the client that there is a date error 'somewhere' in first column without pointing them to the specific record would be just about worthless as far as helping them resolve the error.

Is there a different approach I can take to accomplish my objective of specifically pointing the client to invalid data?
ASKER CERTIFIED SOLUTION
Hamed Nasr
Retired IT Professional

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros