[AccessD] Thanks!! (Was ... (Simple?) Problem Creating a "Yes/No" [Data Type] Field in a MakeTable Query

John Colby jcolby at colbyconsulting.com
Thu Sep 11 22:07:29 CDT 2003


Sometimes simpler is better!

Glad to be of help.

John W. Colby
www.colbyconsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Lawhon, Alan C
Contractor/Morgan Research
Sent: Thursday, September 11, 2003 5:52 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Thanks!! (Was ... (Simple?) Problem Creating a
"Yes/No" [Data Type] Field in a MakeTable Query


To: All Who Offered Help and Suggestions With This Problem

I want to thank each and every one of you who jumped in and tackled this
problem.  I haven't had sufficient time to carefully analyze all the
suggestions (and possible solutions) offered; but the solution John Colby
suggested turned out to be close enough for Government work.

John:

Your idea (i.e. specify "False AS [Record_Select_Flag] INTO <table-name>"
didn't create a "Yes/No" data type field per se, but it DID create a
NUMBER field which, (working as the control source for a checkbox control
on a form), stored either a zero value (or -1) in the [created] field -
which is just as good as having the field with a "Yes/No" data type.

End Result: Problem Solved !!!   :-)))

I've been thru the wringer today.  (I'm getting too old for this ...)

Thanks (again) everybody!

Alan C. Lawhon



-----Original Message-----
From: Lawhon, Alan C Contractor/Morgan Research
[mailto:alan.lawhon at us.army.mil]
Sent: Thursday, September 11, 2003 12:02 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] (Simple?) Problem Creating a "Yes/No" [Data Type]
F ield in a MakeTable Query


John:

Maybe I did something wrong, but I changed the clause/phrase (in SQL view)
to read as you suggested.  (In QBE "Design View" the expression changed
to read like this: Record_Select_Flag: False)

After running the [revised] query and creating the table, the resulting
data type (for the field) is a "Number" data type - NOT a "Yes/No" or
"True/False" data type.

Close, but no cigar ...  (I'll keep trying, but any other suggestions will
be greatly appreciated.)


Alan C. Lawhon


-----Original Message-----
From: John Colby [mailto:jcolby at colbyconsulting.com]
Sent: Thursday, September 11, 2003 11:44 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] (Simple?) Problem Creating a "Yes/No" [Data Type]
Field in a MakeTable Query


Can you specify True / false instead of 0?

False AS [Record_Select_Flag] INTO <table-name>

The quotes around the 0 make it a string which needs a text field.

John W. Colby
www.colbyconsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Lawhon, Alan C
Contractor/Morgan Research
Sent: Thursday, September 11, 2003 12:35 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] (Simple?) Problem Creating a "Yes/No" [Data Type]
Field in a MakeTable Query


Susan, Arthur, Rocky, William, Jim, John, Doris, Jim Lawrence, et al:

I need help with an (easy?) Access problem - and I just know that somebody
on
this list knows the answer.

I am working on a "Make Table" query which will have to be used (and reused)
repeatedly to create the same table from scratch.  One of the field cells in
this query is created (in the QBE pane) from an expression.  The expression
is
as follows:

      Record_Select_Flag: "0"

The corresponding phrase/clause for this expression (in SQL view) is:

      "0" AS [Record_Select_Flag] INTO <table-name>

Here's my problem.  The data type of the field created by this expression is
a
"Text" field.  I would like to create a "Yes/No" checkbox field rather than
a
"Text" field.  (Actually, a "Yes/No" field will work just fine.)  Can anyone
tell me how to modify the expression to create a "Yes/No" field?

I've been searching the Access "Help" library, but so far I haven't found
the
answer ...


Alan C. Lawhon


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list