Importing Excel Into Table - Need Null

  • Thread starter Thread starter Gary
  • Start date Start date
G

Gary

When I use the DoCmd.TransferSpreadsheet, all empty cells in excel are
treated as "empty string" (part of MS Excel). Is there an easy way to have
those empty cell converted over to Null in my Access table ??? I am using
Access 2000, & 2003.

I know I can do them individually in two Do or For statements. I was
wondering is three a better technique??

Thanks,

G
 
Run an update query that sets them to NULL:

UPDATE TableName
SET Field1 = IIf(Field1 = "", NULL, Field1),
Field2 = IIf(Field2 = "", NULL, Field2),
Field3 = IIf(Field3 = "", NULL, Field3);
 
Back
Top