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!

Parameters 1

Status
Not open for further replies.

Elliemay2

Programmer
Dec 15, 2004
4
US
When setting up parameters can you set it up so that the users can leave the field blank and it will return all data without having to setup an "ALL" field in a list? Thanks in advance.
 
when you use the parameter in your query, you can do something like this:

Code:
 where 1=1 or
    myfield = ?Parmaeter
 
Thanks,
How would it work for this situation?

Lets say that I have a field Name and a formula "first letter" and a parameter "fst letter" that prompts the user for the first letter of the name that is specified in the formula "first letter". How would that work? How would it be setup to allow the user to leave the parameter null and it return all Names?
 
Edit your Record Selection to use "Else True" when parameter is blank.


(
If {?FirstLetter} <> "" Then
{Table.Name} startwith {?FirstLetter}
Else True
)
 
startswith" will return all names starting with the letter or letters that are entered in the paramter

Other options are:

\\Will return only names that exactly match parameter
{Table.Name} = {?Name}

\\Will return all names in paramter seperated by comma
{Table.Name} in {?Name}

\\Will allow user to use symbols *, #, ? to return specific \\names
{Table.Name} like {?Name}


 
Startwith is a function that check to see if {Table.Name} starts with {?FirstLetter}. You can look it up in help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top