G
Guest
Hi! I hope I have this in the right discussion group. Here is my problem: I
have a form which is to be used to enter query criteria for up to 14 fields.
I can get it to work, for the most part, by putting
[Forms]![FormName]![TextBoxName]
in the criteria portion of the query, for each field. However, if I leave a
text box blank, the query returns no records at all. I would rather have it
such that if a text box is left blank when the query is run that all entries
in that field will be accepted by the query. For example, if I was to leave
the Year entry blank, then I would get results from all years, limited by the
criteria entered for other fields.
Also, to make things just a little more complicated, I need most of the
fields to require exact entries to get results. By that I mean if I enter a 2
into text box that corresponds to a certain field, then I only want records
returned that have exaclty 2 in that field, not 12 or 2032 or any other
number that has two as one of its digits.
I don't have a lot of experience with Access, so complicated solutions may
be a little beyond me. I can post more specific details if need be. Thanks
for any help you can provide.
have a form which is to be used to enter query criteria for up to 14 fields.
I can get it to work, for the most part, by putting
[Forms]![FormName]![TextBoxName]
in the criteria portion of the query, for each field. However, if I leave a
text box blank, the query returns no records at all. I would rather have it
such that if a text box is left blank when the query is run that all entries
in that field will be accepted by the query. For example, if I was to leave
the Year entry blank, then I would get results from all years, limited by the
criteria entered for other fields.
Also, to make things just a little more complicated, I need most of the
fields to require exact entries to get results. By that I mean if I enter a 2
into text box that corresponds to a certain field, then I only want records
returned that have exaclty 2 in that field, not 12 or 2032 or any other
number that has two as one of its digits.
I don't have a lot of experience with Access, so complicated solutions may
be a little beyond me. I can post more specific details if need be. Thanks
for any help you can provide.