If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Return wildcards in Query Criteria from Form
I'm using the expression in a Query to return the data that someone will
enter into a form's text box. The criteria is returned properly and the reports run fine when the data entry person types the exact name. For example, if the entry person typed "Mike" in the form, the make table query would run and return all records with Mike. If the data entry person enters "Mi*" to get anything that sounds like Mike or Michelle, nothing no records are returned. In the expression builder, I am only referencing the text box, not any of it's properties. I'm simply using: Forms![ContactPerson]![NameTextBox] in the criteria field of the make-table query. Any help in the right direction is appreciated. |
#2
|
|||
|
|||
Don't let them enter the wildcard, just have them enter a partial name....
Like Forms![ContactPerson]![NameTextBox]& "*" Or if you want to find the string in any position... Like "*" & Forms![ContactPerson]![NameTextBox] & "*" Rick B "The parawon" wrote in message news I'm using the expression in a Query to return the data that someone will enter into a form's text box. The criteria is returned properly and the reports run fine when the data entry person types the exact name. For example, if the entry person typed "Mike" in the form, the make table query would run and return all records with Mike. If the data entry person enters "Mi*" to get anything that sounds like Mike or Michelle, nothing no records are returned. In the expression builder, I am only referencing the text box, not any of it's properties. I'm simply using: Forms![ContactPerson]![NameTextBox] in the criteria field of the make-table query. Any help in the right direction is appreciated. |
#3
|
|||
|
|||
On Wed, 23 Mar 2005 12:11:04 -0800, "The parawon"
wrote: I'm using the expression in a Query to return the data that someone will enter into a form's text box. The criteria is returned properly and the reports run fine when the data entry person types the exact name. For example, if the entry person typed "Mike" in the form, the make table query would run and return all records with Mike. Ummm... A MakeTable query is almost certainly neither necessary nor desirable here. Are you making the very common mistaken assumption that you must have data copied into a Table in order to generate a Report? That's not the case; you can base a Report on a simple Select query. John W. Vinson[MVP] |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using form as criteria for report query | Stepney_Clint | General Discussion | 4 | February 7th, 2007 04:28 PM |
Date query parameters entered from form not working | kraymond | Running & Setting Up Queries | 1 | February 21st, 2005 05:41 PM |
Dates in a listbox connected to a form... | RusCat | Using Forms | 13 | November 25th, 2004 02:31 AM |
Still Hoping for help with a Query problem | Don Sealer | Using Forms | 15 | November 13th, 2004 06:24 AM |
Form to Enter Report Criteria works, but Query won't run from Macr | BARKAROO | Using Forms | 1 | October 16th, 2004 08:13 PM |