General discussion

Locked

Using Wild Cards in Select Queries

By DouglasB ·
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.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by sgt_shultz In reply to Using Wild Cards in Selec ...

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

Collapse -

by sgt_shultz In reply to

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...

Collapse -

by DouglasB In reply to

Poster rated this answer.

Collapse -

by DouglasB In reply to Using Wild Cards in Selec ...

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.

Collapse -

by DouglasB In reply to Using Wild Cards in Selec ...

This question was closed by the author

Back to Windows Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums