Combining Yes/No fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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 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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top