"Asha" <(E-Mail Removed)> wrote in message
news:02f701c3a7e2$f4c4ede0$(E-Mail Removed)
> 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.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)