PC Review


Reply
Thread Tools Rate Thread

Please help!

 
 
Asha
Guest
Posts: n/a
 
      11th Nov 2003
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
 
Reply With Quote
 
 
 
 
Dirk Goldgar
Guest
Posts: n/a
 
      11th Nov 2003
"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)


 
Reply With Quote
 
Guest
Posts: n/a
 
      11th Nov 2003
Thank you so much, I can always count on you guys!
>-----Original Message-----
>"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)
>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:50 PM.