Hi,
Does anyone know how to force Access to import all columns as text when using TransferSpreadsheet?
I want to import lists of 'dates' where I know that some will be invalid. Unfortunately, depending on the sort order Access does one of two things:
1)Imports as date data type and deletes the 'bad' data to an import errors table.
2)Imports as text, changing the date values to dateserials
eg:
Data looks like
01/01/2000
01/01/2000
Dave
Bill
imports as:
1)
01/01/2000
01/01/2000
[Null]
[Null]
Field data type = Date
2)
34589
34589
Bill
Dave
Field data type = text
What I want is
01/01/2000
01/01/2000
Bill
Dave
Field data type = text
I'm using IsDate to check if the value is a date and increment one of two counters depending on if it's false or true. IsDate(34589) = False
I've tried using CDate to convert the serials, unfortunately IsDate(CDate(Bill)) = True! (because CDate(Bill) = 0)
So does anyone have any suggestions? I'm using A2002 on an XP system.
Thanks, Iain
Does anyone know how to force Access to import all columns as text when using TransferSpreadsheet?
I want to import lists of 'dates' where I know that some will be invalid. Unfortunately, depending on the sort order Access does one of two things:
1)Imports as date data type and deletes the 'bad' data to an import errors table.
2)Imports as text, changing the date values to dateserials
eg:
Data looks like
01/01/2000
01/01/2000
Dave
Bill
imports as:
1)
01/01/2000
01/01/2000
[Null]
[Null]
Field data type = Date
2)
34589
34589
Bill
Dave
Field data type = text
What I want is
01/01/2000
01/01/2000
Bill
Dave
Field data type = text
I'm using IsDate to check if the value is a date and increment one of two counters depending on if it's false or true. IsDate(34589) = False
I've tried using CDate to convert the serials, unfortunately IsDate(CDate(Bill)) = True! (because CDate(Bill) = 0)
So does anyone have any suggestions? I'm using A2002 on an XP system.
Thanks, Iain