If "Name" = "University of Southern California" THEN

S

Sharon

I have a database that has the name of companies and universities. Sometimes
the University name is too long, i.e. University of Southern California" to
fit correctly in the report. I want the report to change it to "USC", but I
am not sure where I do that. In the report, the query, the table?

If "Name" = "University of Southern California" THEN
"Name" = "USC"
End IF

When I click on the field in the report, I can't add anything to the events
tab. I have tried including this query in the SQL Language but keep getting
errors.

Help.



Sharon
 
R

Rick B

How are the users going to maintain this if you are writing special code for
it?

I'd probably add a field to my table called "PrintName" or similar and have
the user enter what they'd like to see there. In your reports, just code it
to print that field if there is an entry, and if not, then print the actual
name. I'd use the Nz function...

Nz([PrintName],[Name])

You can't modify the report to print it all?
 
R

Rick B

Probably. Did you try turning it off to see if the problem persists? That
would be how I'd investigate this.
 
D

Duane Hookom

Great answer/advice...
--
Duane Hookom
MS Access MVP

Rick B said:
How are the users going to maintain this if you are writing special code
for it?

I'd probably add a field to my table called "PrintName" or similar and
have the user enter what they'd like to see there. In your reports, just
code it to print that field if there is an entry, and if not, then print
the actual name. I'd use the Nz function...

Nz([PrintName],[Name])

You can't modify the report to print it all?


--
Rick B



Sharon said:
I have a database that has the name of companies and universities.
Sometimes
the University name is too long, i.e. University of Southern California"
to
fit correctly in the report. I want the report to change it to "USC",
but I
am not sure where I do that. In the report, the query, the table?

If "Name" = "University of Southern California" THEN
"Name" = "USC"
End IF

When I click on the field in the report, I can't add anything to the
events
tab. I have tried including this query in the SQL Language but keep
getting
errors.

Help.



Sharon
 
T

Tom Lake

Sharon said:
I have a database that has the name of companies and universities.
Sometimes
the University name is too long, i.e. University of Southern California"
to
fit correctly in the report. I want the report to change it to "USC", but
I
am not sure where I do that. In the report, the query, the table?

If "Name" = "University of Southern California" THEN
"Name" = "USC"
End IF

When I click on the field in the report, I can't add anything to the
events
tab. I have tried including this query in the SQL Language but keep
getting
errors.

Try adding a column to the query:

ShortName: IIf ([Name] = "University of Southern California", "USC", [Name])

Then use [ShortName] in your report.

Tom Lake
 
S

Sharon

Thank you.
--
S


Tom Lake said:
Sharon said:
I have a database that has the name of companies and universities.
Sometimes
the University name is too long, i.e. University of Southern California"
to
fit correctly in the report. I want the report to change it to "USC", but
I
am not sure where I do that. In the report, the query, the table?

If "Name" = "University of Southern California" THEN
"Name" = "USC"
End IF

When I click on the field in the report, I can't add anything to the
events
tab. I have tried including this query in the SQL Language but keep
getting
errors.

Try adding a column to the query:

ShortName: IIf ([Name] = "University of Southern California", "USC", [Name])

Then use [ShortName] in your report.

Tom Lake
 
Top