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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why does my list show records

Status
Not open for further replies.

ZOR

Technical User
Joined
Jan 30, 2002
Messages
2,963
Location
GB
Why does my list show records when both captions empty?, it only happened when I added the second part regarding forenames was added. Thanks

SELECT DISTINCT Athletes.Athlete, Athletes.Forename, Athletes.Surname
FROM Athletes
WHERE (((Athletes.Athlete) Like [FORMS]![FORM1].[FORM].[LNAME2].[CAPTION])) OR (((Athletes.Forename) Like [FORMS]![FORM1].[FORM].[LNAME3].[CAPTION]))
ORDER BY Athletes.Athlete;
 
i have now switched to driving the list with SQL, I can kill the rowsource and empty the list, however if anybody can give me an answer to the original question I would appreciate it.thanks
 
Do you have any records with a blank forename?

On another note, do your caption fields have a * in? IF not you're not using any continuation characters and there's no need to use LIKE over =.

Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Thanks for the reply. Yes I did add a * to the inputted text, it's after the inputted characters/words ie Far* so it uses the like statement. The problem was if there was a permanent * in the caption, the list was full of unwanted records from the start (ie before a user entered any search criteria), so I decided to add it after text being entered. Crunch comes if another column is being queried having the other search criteria blank ie no * in it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top