Combining Yes/No fields

M

Mike Diamond

I have yes/no fields which are ticked depending on the relevant industry
sector they are associated with.

In a single record for example Health and Education check boxes could be
ticked and i would like a single field to display the combination of the
result (ie. "Health, Education")

Can anyone suggest how this could be done, prehaps in a query?

Regards
Mike
 
C

Chris2

Mike Diamond said:
I have yes/no fields which are ticked depending on the relevant industry
sector they are associated with.

In a single record for example Health and Education check boxes could be
ticked and i would like a single field to display the combination of the
result (ie. "Health, Education")

Can anyone suggest how this could be done, prehaps in a query?

Regards
Mike

Mike,

As always, please forgive the date suffixes I've attached to the
tables names.

Tables:

CREATE TABLE Unknown_20070519_1
(UnknownID AUTOINCREMENT
,Health BIT
,Education BIT
,CONSTRAINT pk_Unknown_20070519_1
PRIMARY KEY (UnknownID)
)


Sample Data:

UnknownID, Health, Education

1, 0, -1
2, -1, -1
3, 0, 0
4, -1, -1
5, 0, -1


Query:

SELECT U1.UnknownID
,"Health, Education"
FROM Unknown_20070519_1 AS U1
WHERE (U1.Health = -1
AND U1.Education = -1)


Results

2, Health, Education
4, Health, Education



Sincerely,

Chris O.
 
M

Mike Diamond

Thats excellent, thanks for your help Chris.

Chris2 said:
Mike,

As always, please forgive the date suffixes I've attached to the
tables names.

Tables:

CREATE TABLE Unknown_20070519_1
(UnknownID AUTOINCREMENT
,Health BIT
,Education BIT
,CONSTRAINT pk_Unknown_20070519_1
PRIMARY KEY (UnknownID)
)


Sample Data:

UnknownID, Health, Education

1, 0, -1
2, -1, -1
3, 0, 0
4, -1, -1
5, 0, -1


Query:

SELECT U1.UnknownID
,"Health, Education"
FROM Unknown_20070519_1 AS U1
WHERE (U1.Health = -1
AND U1.Education = -1)


Results

2, Health, Education
4, Health, Education



Sincerely,

Chris O.
 
Top