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);
 

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

Back
Top