Conditional format question

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

Guest

Hi everyone!

Ok here goes:

I have four columns in a database, let's say A,B,C and D. Column A is where
I want to return the results. I need to look at Column B and if there is the
value "UNDELIVERABLE, [Exp", then I need to return the word "Undeliverable"
and then a hyphen, with the respective field from Column D. If Column B does
not have "UNDELIVERABLE, [Exp", then I need to return Column C, hyphen,
Column D. Also, this is ultimately to be displayed in a report - does the
manipulation need to be done in the query that the report references, or can
it be expressed in a Text Box within the report?

Can someone help me please!!!

Much Thanks,
Victoria
 
Victoria,
A calculated field should do it... you can add it in the query, or in a text control on
the report.
= IIF([ColB] = "UNDELIVERABLE, [Exp", "Undeliverable - " & [ColD], [ColC] & " - " &
[ColD])

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
There are 10 types of people in the world.
Those who understand binary, and those who don't.
 
YOU ARE A GENIUS!!!

Now...for one last question - I need to delete records from 2 additional
columns when Column A shows "Undeliverable" -

If: Column A = "Undeliverable - " & [ColD]"
Then: Delete records from Column E & F.

Any thoughts?

Victoria

Al Camp said:
Victoria,
A calculated field should do it... you can add it in the query, or in a text control on
the report.
= IIF([ColB] = "UNDELIVERABLE, [Exp", "Undeliverable - " & [ColD], [ColC] & " - " &
[ColD])

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
There are 10 types of people in the world.
Those who understand binary, and those who don't.

Victoria1366 said:
Hi everyone!

Ok here goes:

I have four columns in a database, let's say A,B,C and D. Column A is where
I want to return the results. I need to look at Column B and if there is the
value "UNDELIVERABLE, [Exp", then I need to return the word "Undeliverable"
and then a hyphen, with the respective field from Column D. If Column B does
not have "UNDELIVERABLE, [Exp", then I need to return Column C, hyphen,
Column D. Also, this is ultimately to be displayed in a report - does the
manipulation need to be done in the query that the report references, or can
it be expressed in a Text Box within the report?

Can someone help me please!!!

Much Thanks,
Victoria
 
Victoria,
First, I don't think you mean "delete records" from E & F. You mean delete the
contents of fields E & F

(I'm assuming ColE and ColF are bound fields with values entered...)
Since ColB causes calculated ColA to assume 2 states according to the ColB entry, use
the AfterUpdate event of ColB to...

If ColB = "Undeliverable - " & [ColD]" Then
ColE = ""
ColF = ""
End If

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
There are 10 types of people in the world.
Those who understand binary, and those who don't.

Victoria1366 said:
YOU ARE A GENIUS!!!

Now...for one last question - I need to delete records from 2 additional
columns when Column A shows "Undeliverable" -

If: Column A = "Undeliverable - " & [ColD]"
Then: Delete records from Column E & F.

Any thoughts?

Victoria

Al Camp said:
Victoria,
A calculated field should do it... you can add it in the query, or in a text control
on
the report.
= IIF([ColB] = "UNDELIVERABLE, [Exp", "Undeliverable - " & [ColD], [ColC] & " - " &
[ColD])

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
There are 10 types of people in the world.
Those who understand binary, and those who don't.

Victoria1366 said:
Hi everyone!

Ok here goes:

I have four columns in a database, let's say A,B,C and D. Column A is where
I want to return the results. I need to look at Column B and if there is the
value "UNDELIVERABLE, [Exp", then I need to return the word "Undeliverable"
and then a hyphen, with the respective field from Column D. If Column B does
not have "UNDELIVERABLE, [Exp", then I need to return Column C, hyphen,
Column D. Also, this is ultimately to be displayed in a report - does the
manipulation need to be done in the query that the report references, or can
it be expressed in a Text Box within the report?

Can someone help me please!!!

Much Thanks,
Victoria
 

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