Importing Blank Date Fields

G

Guest

Hello,
I have a macro that imports data from a spreadsheet into a DB. it works fine
however, Recently I added a column in the DB and Spreadsheet macro for
another Date Field. The majority of the time this field is null. When I run
the macro it always fails on the new date field. I know it is because it is a
null field. I have entered dates into the field on the spreadsheet for
testing purposes and it works fine. so there is nothing wrong with the macro.
Is there something I can add or change in the DB to allow these null dates to
be entered. I have the required in the DB field properties set to NO. I tried
adding a date like 1/1/1900 as a default and had no luck.
 
D

Douglas J. Steele

Has the date field's Required property been set to No? That's how you can
accept Null values in a field.
 
G

Guest

Yes it has been set to No. If I highlight the spreadsheet and manually paste
it into the DB I have no problem.
 
G

Guest

Update Please disregard. I realized that worksheetfunction.trim in my macro
was the cause of the error. If all fields are blank this function will give
you an error. I removed it and it seems fine.

Thanks

chris
 

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

Top