Can Access pick between two addresses?

  • Thread starter Thread starter DSmith
  • Start date Start date
D

DSmith

In a report, can I pick between a home or office address to print based on
Send To field of O or H?
 
Yes, you can probably use an expression in a control source like:
=IIf([SendTo]="O",[AddressOffice], [AddressHome])
 
If the office and home address are several fields, do I just put it into one
expression such as: =([FirstName] & " " & [LastName]) & Chr(13) & Chr(10) &
[Address] & [Address2] & Chr(13) & Chr(10) & [City] & "," & [State] & " " &
[zipcode])

Duane Hookom said:
Yes, you can probably use an expression in a control source like:
=IIf([SendTo]="O",[AddressOffice], [AddressHome])

--
Duane Hookom
MS Access MVP
--

DSmith said:
In a report, can I pick between a home or office address to print based on
Send To field of O or H?
 
Probably... try it. I don't know how many copies of the fields you have in
your table.

--
Duane Hookom
MS Access MVP
--

DSmith said:
If the office and home address are several fields, do I just put it into
one
expression such as: =([FirstName] & " " & [LastName]) & Chr(13) & Chr(10)
&
[Address] & [Address2] & Chr(13) & Chr(10) & [City] & "," & [State] & " "
&
[zipcode])

Duane Hookom said:
Yes, you can probably use an expression in a control source like:
=IIf([SendTo]="O",[AddressOffice], [AddressHome])

--
Duane Hookom
MS Access MVP
--

DSmith said:
In a report, can I pick between a home or office address to print based on
Send To field of O or H?
 
It didn't work with the one line. So I'm doing one field at a time and that
works --just cumbersome.


Duane Hookom said:
Probably... try it. I don't know how many copies of the fields you have in
your table.

--
Duane Hookom
MS Access MVP
--

DSmith said:
If the office and home address are several fields, do I just put it into
one
expression such as: =([FirstName] & " " & [LastName]) & Chr(13) & Chr(10)
&
[Address] & [Address2] & Chr(13) & Chr(10) & [City] & "," & [State] & " "
&
[zipcode])

Duane Hookom said:
Yes, you can probably use an expression in a control source like:
=IIf([SendTo]="O",[AddressOffice], [AddressHome])
based
on
Send To field of O or H?
 
OK- the one line did work after minor adjustments-worked great! Thanks a
lot!

DSmith said:
It didn't work with the one line. So I'm doing one field at a time and that
works --just cumbersome.


Duane Hookom said:
Probably... try it. I don't know how many copies of the fields you have in
your table.

--
Duane Hookom
MS Access MVP
--

DSmith said:
If the office and home address are several fields, do I just put it into
one
expression such as: =([FirstName] & " " & [LastName]) & Chr(13) & Chr(10)
&
[Address] & [Address2] & Chr(13) & Chr(10) & [City] & "," & [State] &
"
"
&
[zipcode])

Yes, you can probably use an expression in a control source like:
=IIf([SendTo]="O",[AddressOffice], [AddressHome])

--
Duane Hookom
MS Access MVP
--

In a report, can I pick between a home or office address to print based
on
Send To field of O or H?
 
Back
Top