how do i or can i get either this colum or that colum...

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

Guest

I am working in a data base that I did not create and am making some
modifications. The data base lists clients name, home address and work
address (and other info) within the same table and same record.
What I need to do is be able to run a mailing list and have the list contain
the home address and if no home address is listed, then provide the work
address.
Sometimes both fields contain information and sometimes only one or the other.
Is this possible to work with or should i start a new table with some design
changes and what would you suggest.
Thank You so very much!
 
No need for more tables. In your query put IIF statements to use work
address elements if the home address is null. Use the same test for all
address elements like street field even if someone has entered the city and
state.
 
I am working in a data base that I did not create and am making some
modifications. The data base lists clients name, home address and work
address (and other info) within the same table and same record.
What I need to do is be able to run a mailing list and have the list contain
the home address and if no home address is listed, then provide the work
address.
Sometimes both fields contain information and sometimes only one or the other.
Is this possible to work with or should i start a new table with some design
changes and what would you suggest.
Thank You so very much!

You can use the NZ() function:

NZ([HomeAddress], [WorkAddress])

will return the home address field if it exists, and otherwise the
work address.

John W. Vinson[MVP]
 
Thank you Karl- I tired and I guess I am not entering the IIf expression
correctly or in the right place because I am not getting the result I had
hoped for. I also tried the NZ function that John suggested and still no
luck. I also read the question from Basil who is trying to do what sounds
similar to me, but sounds like his info is in different tables and mine is
the same table.
hope you can help-
Thanks again!-
 
Thank you Karl- I tired and I guess I am not entering the IIf expression
correctly or in the right place because I am not getting the result I had
hoped for. I also tried the NZ function that John suggested and still no
luck. I also read the question from Basil who is trying to do what sounds
similar to me, but sounds like his info is in different tables and mine is
the same table.
hope you can help-
Thanks again!-

Please post:

The name of your table and of the relevant fields
The Query you were trying to use
A description of how it "doesn't work"

John W. Vinson[MVP]
 

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