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!

wildcard query in approach 1

Status
Not open for further replies.

raisinchicky

Technical User
Oct 5, 2005
6
GB
I designed a database in Access but then had to change it into Approach. I had a query set up whereby the user would enter the text they wanted to find into a popup window and Access would search the relevant field, automatically inserting a wildcard either side of the text. Is there any way to set up something similar in Approach so I don't have to keep typing in *'s??

Thankyou,
Tanya
 
Yes, you can use a variable type field for the user to type into. Lets call this field VarText. Define it as variable type with data option set to "text". Put it on a view and put some text into it that will result in at least one matching record.

Now you can set up the FIND manually by clicking the Find button on a view and then type this formula into a text field on the view (form or worksheet):

If(Position(Upper(yourtargetfield),Upper(VarText),1) > 0)

After the Find runs, you can give it a name by typing over the <current find/sort> on the Action Bar. Once it has a name, you can define a macro to take the user to the popup form and let the person type into the field. You can then run the Find macro "on data change" of the VarText field or provide a button for the user to click when they are ready.

Sue Sloan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top