Add Yes/No in Make Table Query

I'd like to create a Yes/No field in a make table query with the value default to No.  How do I do this?
vsllcAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
you can try this

select f1,f2, cbool(0) as YN into newtable
from oldtable
0
 
Rey Obrero (Capricorn1)Commented:
in the design view of the table
add the yesNo field,
you can place 0 (zero) in the default value
which is normally the default value for a YesNo field
0
 
Rey Obrero (Capricorn1)Commented:
sorr, did not see the make table query
0
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
vsllcAuthor Commented:
That gives me the value, but I was looking to have the Y/N checkbox in that field so a user could check a record they want to exclude from a second query I will run off of table.  Is that possible or perhaps a diff method would be a better approach?
0
 
Rey Obrero (Capricorn1)Commented:
you can't produce a check box in a make table query.
it is possible to convert the YN field to a check box using vba codes, but that is another topic.
0
 
Dale FyeCommented:
0
 
Rey Obrero (Capricorn1)Commented:
yeah that is right, those are my codes :-)
0
 
Dale FyeCommented:
Yes, it is.  But why didn't you just post that reference or code, rather than calling it "another topic"?

vsllc, recommend you give capricorn1 the points.
0
 
Rey Obrero (Capricorn1)Commented:
because it is "another topic"
the original question has already been answered at http:#a35207356
0
 
Armen Stein - Microsoft Access MVP since 2006PresidentCommented:
You shouldn't use a MakeTable anyway - it's hard to control.  We always use a work table with a persistent structure.  Instead of the MakeTable query, clear the work table out with a Delete query and then reload it with an Append query.  Then you can structure it and control data any way you like.

Cheers,
Armen
0
 
vsllcAuthor Commented:
I stayed with the Cbool since 0/1 is the value to be held anyway.  The checkbox was going to be used for the user to select/deselect, but I decided best to keep them out of the table.

Thanks for the help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.