Importing text to a checkbox

S

Stanley

Hi,
I have an excel file that I need to import to access. Problem is that in the
access database the fields are yes/no checkboxes. For example, the column is
called 'A'. Now in my excel file i have a whole column called 'A'. Now how
can I import the file so that if there is anything in column 'A' in the excel
file it will check the checkbox in access in the 'A' column?
I could change all the info in the excel file in the column a, so long as it
will check the checkbox.
Any suggestions? Thanks!
 
K

Ken Snell [MVP]

A checkbox field will show as "checked" if the value of that field is True,
which ACCESS stores as -1. You could change the values in your EXCEL
worksheet's column A to -1 if you want the checkbox to be true in the table.

Othewise, you could import the EXCEL data into a temporary table, then use
an append query to copy the data into the permanent table. This append query
would use a calculated field to test if the "A" field in the temporary table
has any value, and if yes put True (or -1) into the permanent table, else
put False (0) in the permanent table.
 

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