Wildcards or bad table design

G

Guest

My question is can wildcards be used in the parameter of a query. I have
tried using wildcards but have had no luck.
I have a form which uses queries to populate three controls, cboState,
cboCounty, and cboJurisdiction. These controls must be filled out in the
order stated. The problem is that some jurisdictions send out bills that do
not refer to the county they are situated in. I thought that I could create
a query that users could call from the form to find the county that the
jurisdiction was in by using wildcards. In my tblJurisdictions I refer to
countys as XXX County or YYY County, all other jurisdictions are City of AAA
or Village of BBB. Was it a mistake to not have a field in my table such as
jurisdiction type and should I add it now.

Thanks
Cary
 
J

John Vinson

My question is can wildcards be used in the parameter of a query.

Certainly. You need to use the LIKE operator though -

LIKE [Forms]![formname]![controlname]

or

LIKE "*" & [Forms]![formname]![controlname] & "*"

for example.
I have
tried using wildcards but have had no luck.

What did you try?
I have a form which uses queries to populate three controls, cboState,
cboCounty, and cboJurisdiction. These controls must be filled out in the
order stated. The problem is that some jurisdictions send out bills that do
not refer to the county they are situated in. I thought that I could create
a query that users could call from the form to find the county that the
jurisdiction was in by using wildcards. In my tblJurisdictions I refer to
countys as XXX County or YYY County, all other jurisdictions are City of AAA
or Village of BBB. Was it a mistake to not have a field in my table such as
jurisdiction type and should I add it now.

This appears to have nothing whatsoever to do with your question, and
it assumes a lot more knowledge of your database structure and
business rules than you have posted...

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top