If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
access query
I have a query that pulls name/address information. There is an adrcode
field that shows if the address is work or home and there is a company field. I only want to pull the company field if the adrcode field = work. How can I do this? -- Leslie - AGA |
#2
|
|||
|
|||
access query
Did not follow all you said. Do you have two addresses or one that can be
either home or work? "Leslie" wrote: I have a query that pulls name/address information. There is an adrcode field that shows if the address is work or home and there is a company field. I only want to pull the company field if the adrcode field = work. How can I do this? -- Leslie - AGA |
#3
|
|||
|
|||
access query
Leslie wrote:
I have a query that pulls name/address information. There is an adrcode field that shows if the address is work or home and there is a company field. I only want to pull the company field if the adrcode field = work. How can I do this? Use a calculated field something like: ContactAddr: IIf(adrcode = "work", homeaddress, workaddress) -- Marsh MVP [MS Access] |
#4
|
|||
|
|||
access query
One address that is either work or home with the indicator being the adrcode
field. -- Leslie - AGA "KARL DEWEY" wrote: Did not follow all you said. Do you have two addresses or one that can be either home or work? "Leslie" wrote: I have a query that pulls name/address information. There is an adrcode field that shows if the address is work or home and there is a company field. I only want to pull the company field if the adrcode field = work. How can I do this? -- Leslie - AGA |
#5
|
|||
|
|||
access query
My best guess at what you want is that you are only interested in the company
name. So if the address is home then ignore. In the design view of your query add an output field to the grid like this -- Company Name: IIF([adrcode] = "work", [company],"") or Company Name: IIF([adrcode] = "work", [company],"Home address only") "Leslie" wrote: One address that is either work or home with the indicator being the adrcode field. -- Leslie - AGA "KARL DEWEY" wrote: Did not follow all you said. Do you have two addresses or one that can be either home or work? "Leslie" wrote: I have a query that pulls name/address information. There is an adrcode field that shows if the address is work or home and there is a company field. I only want to pull the company field if the adrcode field = work. How can I do this? -- Leslie - AGA |
Thread Tools | |
Display Modes | |
|
|