Check boxes vs X's ???

  • Thread starter Thread starter TotallyConfused
  • Start date Start date
T

TotallyConfused

I will be imported into Access a Table that has X's in a field. I need to
update a table in Access that has his same field but it is a checkbox -
Yes/No. How do I write an update query to update the Access table to yes
were the Excel table has Xs. I hope this makes sense. Thank you in advance
for any help you can provide.
 
When you import from Excel, you will get a Text field that cantains the "X".
You can then add a yes/no field to your table, and use an Update query to
populate it.

Let's assume the imported field is named Field2. Steps:
1. Create a query using this table.

2. Change it to an Update query (Update on Query menu.
Access adds an Update row to the grid.

3. In the Criteria row under Field2, enter:
"X"

4. In the Update row under the new Yes/No field you created, enter:
True

5. Run the query.

Now check that the results match, and you can delete Field2 from the table.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
TotallyConfused said:
I will be imported into Access a Table that has X's in a field. I need to
update a table in Access that has his same field but it is a checkbox -
Yes/No. How do I write an update query to update the Access table to yes
were the Excel table has Xs.


Import the table, add the YN field and then run the query:

UPDATE atbl SET YNfield = (Xfld = "X")

After you get what you want, drop the Xfld
 

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