like * problem

  • Thread starter Thread starter DubboPete
  • Start date Start date
D

DubboPete

Hi all,

Followed some leads on here to filter names in a query, based on the
value of a text box on a form, but the query returns all records
regardless! Here's the code:

Like "*" & ([forms]![frmcallcontacts]![text80]) & "*"

Can't work out why everyone on here says it should work, and it
don't! Searching for say SMITH within 500 records of full names, and
I know there's five instances in five separate records.

Any help apprciated

Pete
 
Just a random thought: are you certain that text80 actually contains any
data at the moment when this query is being executed? If it doesn't, for
whatever reason, your condition will read Like "**", which will naturally
return everything.

Pete
 
Just a random thought: are you certain that text80 actually contains any
data at the moment when this query is being executed? If it doesn't, for
whatever reason, your condition will read Like "**", which will naturally
return everything.

Pete

"DubboPete" <[email protected]> píse v diskusním príspevku

Followed some leads on here to filter names in a query, based on the
value of a text box on a form, but the query returns all records
regardless!  Here's the code:
Like "*" & ([forms]![frmcallcontacts]![text80]) & "*"
Can't work out why everyone on here says it should work, and it
don't!  Searching for say SMITH within 500 records of full names, and
I know there's five instances in five separate records.
Any help apprciated
Pete- Hide quoted text -

- Show quoted text -

Ha! Good call Pete!

Forgot to move the cursor out of the field (as in "click the command
button and run the query"), so obviously didn't work that time
around. It works perfectly of course....

Is it Friday yet, and is the bar open? Get me out of here!

Pete
 
"DubboPete" <[email protected]> píse v diskusním príspevku
Just a random thought: are you certain that text80 actually contains any
data at the moment when this query is being executed? If it doesn't, for
whatever reason, your condition will read Like "**", which will naturally
return everything.

Pete

"DubboPete" <[email protected]> píse v diskusním
príspevku

Followed some leads on here to filter names in a query, based on the
value of a text box on a form, but the query returns all records
regardless! Here's the code:
Like "*" & ([forms]![frmcallcontacts]![text80]) & "*"
Can't work out why everyone on here says it should work, and it
don't! Searching for say SMITH within 500 records of full names, and
I know there's five instances in five separate records.
Any help apprciated
Pete- Hide quoted text -

- Show quoted text -
Ha! Good call Pete!
Forgot to move the cursor out of the field (as in "click the command
button and run the query"), so obviously didn't work that time
around. It works perfectly of course....

Is it Friday yet, and is the bar open? Get me out of here!

One more day to go, at least here.

Pete
 
Back
Top