Solved

Add Yes/No in Make Table Query

Posted on 2011-03-24
11
337 Views
Last Modified: 2012-05-11
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?
0
Comment
Question by:vsllc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
  • 2
  • +1
11 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35207015
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
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35207022
sorr, did not see the make table query
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 35207209
you can try this

select f1,f2, cbool(0) as YN into newtable
from oldtable
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:vsllc
ID: 35207287
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
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35207356
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
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 35208095
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35208141
yeah that is right, those are my codes :-)
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 35208262
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
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35208287
because it is "another topic"
the original question has already been answered at http:#a35207356
0
 
LVL 9
ID: 35210829
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
 

Author Comment

by:vsllc
ID: 35215277
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

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question