Please help!

  • Thread starter Thread starter Asha
  • Start date Start date
A

Asha

I have a need to append fields separtaed by commas to a
new field by creating a query. HOw do I do this using
Access query. Here is my structure:

id -primary key
first - text
last - - text
cable - yes/no
modem - yes/no
process - yes/no

I need to create a new field call totalequipment that
combines the name cable, modem, process if the value in
the field is 1 (meaning yes)


So here is an example of the output:
New column
id First Last Cable Modem process totalequipment
___________________________________________________________
12 Mark Phillips 1 0 1 Cable, process
 
Asha said:
I have a need to append fields separtaed by commas to a
new field by creating a query. HOw do I do this using
Access query. Here is my structure:

id -primary key
first - text
last - - text
cable - yes/no
modem - yes/no
process - yes/no

I need to create a new field call totalequipment that
combines the name cable, modem, process if the value in
the field is 1 (meaning yes)


So here is an example of the output:
New column
id First Last Cable Modem process totalequipment
___________________________________________________________
12 Mark Phillips 1 0 1 Cable, process


How about a calculated field defined like this in the query's field
grid:

TotalEquipment: Mid(IIf(Cable=0, "", ", Cable") &
IIf(Modem=0, "", ", Modem") &
IIf(Process=0, "", ", Process"), 3)

Note: I broke the expression onto separate lines for clarity, but it
should actually all be on one line in the query design.
 
Thank you so much, I can always count on you guys!
-----Original Message-----
process


How about a calculated field defined like this in the query's field
grid:

TotalEquipment: Mid(IIf(Cable=0, "", ", Cable") &
IIf(Modem=0, "", ", Modem") &
IIf
(Process=0, "", ", Process"), 3)
 
Back
Top