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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Field Expression 1

Status
Not open for further replies.

LISAANN

Technical User
Nov 28, 2001
12
US
I have a form field labled "Display/Print Name", I would like this field to contain either the first and last name of the client or the company name if the aforementioned is null. How would I go about this?

Thank you for your help!

Lisa
 
Do you intend that this is a stored, calculated field, which is against the rules, or is it purely for display?
 
Purely display as the information being stored will already have been entered by the database manager.
 
In that case, set the control source to something like:

=IIf(Trim([CompanyName] & "")="",[FName] & " " & [SName],[CompanyName])
 
Wouldn't it be better to just have a report built with the 3 fields instead?

FirstName LastName CompanyName
------------------------------------------
John Doe Deere


And then have the button just display the report when clicked. Also you will need to build the query to pull those three fields and build your report based on that query.



:)WB
 
This works perfectly, thank you so much for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top