How to Make Table query create a Yes/No field

  • Thread starter Thread starter Phil Smith
  • Start date Start date
P

Phil Smith

I have a query which will make a table which will then be used in a form
for some data entry/manipulation. I want to put a couple of Yes/No
fields in that table, filled with "no."

I can set the property of the field in the design grid to yes/no.
The field itself, I have tried:

Approved:no
Approved:"no"
Approved: 0

The first generates an error, The second generates a text field, the
third generates a number field. How do I generate a Yes/No field?
 
consider; instead of a MakeTable query use an AppendQuery; you can then
premake your table with the field property being yes/no....and when you
append data it will keep that property.

given that you are oriented to MakeTable I will guess you plan to remake a
table over and over......since this solution is to use an AppendQuery - you
may need to make also a DeleteQuery that will clear out this table before you
append other new data....

hope this helps...
 
The simplest solution is to create the table exactly the way you want it.
Then populate it with an Append query, rather than a Make Table query.

If you plan to repopulate this table from time to time, just clear it out
with a Delete query before you Append again. It's dead simple, and 100%
reliable.

You may be able to get a Yes/No field if you use FALSE as the value, or use
CBool() to force Access to understand it, or set the Format property of the
field (in query design.) This still isn't as reliable as creating the table
correctly yourself.
 
Back
Top