Discussion Locked

Using Wild Cards in Select Queries

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have designed several database queries to prompt the user for input as to color, size, type, etc. Is there a way to by-pass one of the prompts with a wild card? For example, the user inputs black for the color, large for the size, but does not know the type. If type is left blank, no records are returned from the query. In this scenario I would like the color black, size large, and all types that match those two criteria returned.

5 replies

by sgt_shultz

to me you are describing an IF statement in VBA (or javascript or php or Access SQL or whatever)- not a wildcard. you want something like IF type=blank (or null or empty string--you will find out about dirty data now maybe) THEN SELECT ALL from the types table.
this is not too hard to figure out with Help and Examples given in your software probably. you did not mention what software you are using to develop user interface? is it Access? what version? post this again during the week with that info, imho to get to the programmers here for exact code for your situation. imho put a few more points on for code

by sgt_shultz

Access 2003 is very good. has good wizards and help. vba is easy and fun once you get over the hump. you will use it for years to come. i always see if i can have access record a macro then i look at the code and modify it. i really never code from scratch. plus search internet for vba code examples there is much out there. good luck and keep asking as specific questions as you can...

by douglasb

I am using Access 2003. Don't know much about Visual Basic, but sounds like I might have to learn, huh? Thanks for the response.

This discussion is closed to new replies.