|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
search form not working properlyquery. 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.
Show quote
Hide quote
"Krazy Darcy" <KrazyDa***@discussions.microsoft.com> wrote in message This is the wrong group for this kind of question but I would suggest that news:BEB645AA-2F09-44B3-A5D0-4705442D1FA2@microsoft.com... >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. 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
Access-New User-Help!!
Security nightmare - 2 mdw's mixed up Digital Certificate for runtime installs. (Not Self Cert) Diff Workgroups, Same DB, diff Security log on screen in Access? Programatically hide and unhide the database window can't run report from crystal reports Self-Signed Certificate how to export? Access 2000 Security - Workgroup, Owner, User Permissions etc., H MS Access 2003 - Owner |
|||||||||||||||||||||||