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!

First and Last Name in Parameter

Status
Not open for further replies.

Corres

Technical User
Jun 13, 2006
87
CA
CRXI

Can I use two fields in parameter first and last name, if these data are separate fields in table?

Or
Can I use simple formula as a parameter?

Thanks.
 
You can prompt the user to enter first and last name into a parameter field.

Then create a formula to combine the first and last name of the record be read into the formula field:

Trim(table.lastname) + " " + Trim(table.firstname)

In your record select formula compare the formual field to the parameter.

MrBill
 
Hi,
Do you mean that you want your users to enter a full name and than find the matching record(s) with that first name and last name?

If so, you will need to control how the users enter the Name..If always in this format:

LastName,FirstName

then you can parse that into 2 parts and use those to compare against the 2 fields in the database something like this in your selection criteria:
Code:
StringVar LName := Trim(Split({?Param},',')[1]);
StringVar FName := Trim(Split({?Param},',')[2]);

{Table.LastName} = Lname and {Table.FirstName} = FName

You must insure that the input is in the correct format, so look at the possible edit masks for the parameter..





[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top