Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula Help

Status
Not open for further replies.

btcomput

Programmer
Jul 10, 2000
10
0
0
US
Hi,

I have set up this formula:
TrimRight ({Roster.Last})+ ", " + TrimRight ({Roster.First}) + " " + {Roster.MI}

to display first last and MI fields in a "Name" column.

As long as all three fields are NOT null, I get:

Name:
Jones, Fred P
Smith, Nancy A
Timmons, Ned W

If a MI is blank, such as Nancy Smith with no middle initial, I get:

Name:
Jones, Fred P

Timmons, Ned W

Other fields in Nancy Smith's record display fine, but her name (or anyone else's with no middle initial), does not get displayed.

Can anyone suggest a way to modify the formula so that ALL names print? I would rather not make the middle initial be required.

Thanks,

 
If IsNull({Roster.MI}) then
TrimRight ({Roster.Last})+ ", " + TrimRight ({Roster.First})
Else
TrimRight ({Roster.Last})+ ", " + TrimRight ({Roster.First}) + " " + {Roster.MI} Malcolm
wynden@telus.net
 
I have a similar problem, and have included a similar if/then/else statement. The problem is, one of the joins in my SQL Query is on one of these fields that can at times be NULL. I've tried all kinds of joins w/ no luck yet....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top