team criteria problem

  • Thread starter Thread starter _Bigred
  • Start date Start date
B

_Bigred

Access 2000

I have a db that is causing me problems, with setting the team criteria.

I want to run a query and have [Enter Team Name], then return all results
that are for the team lifetime in the db (approx 85,000 records).

It is a baseball db, that I didn't create but am trying to expand upon.

example: Milwaukee teams will be indicated in the database as "ML1" or "ML4"
or "Mil". I would like to setup a query so if a user types in "Mil" they
would return all results of any milwaukee team. Many mlb teams have a
similar team listings in the db (if they had multiple teams in mlb history)
so I would like to accomplish this in a different way rather than set a
permanent query with "Mil"or"ML4"or"ML1". if a user wants to query a team
that has more than one historical team, they can type in 1 criteria to
return all results. Because I can always use a date criterion to limit the
records returned.

I hope this make sense, if not please let me know so I can clarify
TIA,
_Bigred
 
Yes, it makes sense, and you can do it using wildcards in your criteria...
instead of having just [Enter Team Name] in your criteria, try:
Like [Enter Team Criteria] & "*"

This will find all teams who start with the criteria that is entered. You
could look for teams where the criteria appears anywhere in the team name
with:
Like "*" & [Enter Team Criteria] & "*"

However, note that even with this, it won't find teams whose name begin
with "Mil" if you enter "ML"... you may be better off creating a separate
table with all the cities in it, and linking that to the table of teams.
 
Back
Top