Thanks but seems when maketbale is used on the query it returns number as datatype than boolean. I am trying to use check box here so type needs to be yes/no by default for that to work.
Ah, it's a MakeTable query! I'm afraid you can't get Access to create a Boolean column using a MakeTable query. But there are a couple of alternatives you could consider.
1. Run the MakeTable, and then modify the field definition from Number to Yes/No. (You can only do this in the user interface. DDL doesn't support changing a column data type.)
2. If you need an all-code solution, either
2A. Create the table in code using DDL, and then use an Append query instead of the MakeTable query, or
2B. Use the MakeTable query, then use DDL to add a Boolean column, then run an Update query to copy the Number column to the Boolean column, then use DDL to Drop the Number column.
Rick Sprague
Want the best answers? See faq181-2886 To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.