DLookup help for report

S

Steve T

I have a report named rptPOTDBV. The query for the report is qryPOTDBV.
The report return purchase order details by vendor. the query returns a
soldtoaddress with soldtophonenumber and a shiptoaddress with
shiptophonenumber. If the sold to and ship to are the same, then we enter
the ship to address as SAME.

What I am wanting the report to give me is the contact information for the
order.

Here is what I am needing in non-programming language:

If shipaddress from qryPOTDBV = Same then "unbound-report-box-for-address" =
soldtoaddress and "unbound-report-box-for-phone-number" = soldtophonenumber
Else
"unbound-report-box-for-address" = shiptoaddress and
"unbound-report-box-for-phone-number" = shiptophonenumber

I hope all the makes sense.

Thanks for any help that can be given.\


Steve T
 
S

Steve Schapel

Steve,

In the Control Source property of the "unbound-report-box-for-address"
(make sure this textbox is not named the same as one of the fields!),
put the equivalent of this...
=IIf([shiptoaddress]="same",[soldtoaddress],[shiptoaddress])
And for the phone box...
=IIf([shiptoaddress]="same",[soldtophonenumber],[shiptophonenumber])
 
S

Steve T

Worked like a champ!

thank you so much for the help. I was trying to do this code on the "on
open" for the report.

Thanks again!

Steve T


Steve Schapel said:
Steve,

In the Control Source property of the "unbound-report-box-for-address"
(make sure this textbox is not named the same as one of the fields!), put
the equivalent of this...
=IIf([shiptoaddress]="same",[soldtoaddress],[shiptoaddress])
And for the phone box...
=IIf([shiptoaddress]="same",[soldtophonenumber],[shiptophonenumber])

--
Steve Schapel, Microsoft Access MVP


Steve said:
I have a report named rptPOTDBV. The query for the report is qryPOTDBV.
The report return purchase order details by vendor. the query returns a
soldtoaddress with soldtophonenumber and a shiptoaddress with
shiptophonenumber. If the sold to and ship to are the same, then we
enter the ship to address as SAME.

What I am wanting the report to give me is the contact information for
the order.

Here is what I am needing in non-programming language:

If shipaddress from qryPOTDBV = Same then
"unbound-report-box-for-address" = soldtoaddress and
"unbound-report-box-for-phone-number" = soldtophonenumber
Else
"unbound-report-box-for-address" = shiptoaddress and
"unbound-report-box-for-phone-number" = shiptophonenumber

I hope all the makes sense.

Thanks for any help that can be given.\


Steve T
 

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

Top