"Krazy Darcy" <KrazyDarcy[ at ]discussions.microsoft.com> wrote in message news:BEB645AA-2F09-44B3-A5D0-4705442D1FA2[ at ]microsoft.com...
[Quoted Text] >I have a search form that has one text box that is input procedure into a > query. > using query expression : > > Like "* " & [Forms]![test]![keywordsearch] & "*" > > That works. > I have the query run on searchform opening and a requery button to re run > the search with the user defined values (using a requery action macro) > > I tried to add another two boxes and have it so the results returned > depend > on which box the search request was typed into ie if only the year text > box > is filled in then return anything with matching value (year is a 4 digit > number - not a date field) or if in the description box then search > through > records in the description field and if the keyword box then the keyword > field. > > What happened was it seems to return virtually all records regardless of > which box i enter my request in. > > I used the same expression but changed the name of the appropriate text > box > to match the box it's supposed to read from fr searching that field. > > Have tried both "and" and "or" with similar results. > > I have tried running the query directly to see if it is the form at fault > or > the query and still get similar results. > > Unsure if this is a query issue, form issue or both. > > Thans.
This is the wrong group for this kind of question but I would suggest that it's a wildcard issue - your query string will contain "Like **" for those text boxes left blank. Have you considered using "filter by form"?
Keith. www.keithwilby.com
|