query query

G

Grip

I've got a table of Memberships and a table of Membership types. I'd
like to build a reporting interface that has an unbound box that
allows users to select from the list of membership types and find
those memberships (among other search criteria). If the box is left
blank, the user should find all memberships regardless of type.

So I built the form, added the text box, and named it. I'm in the
middle of building the query that should run after users enter in
their criteria. I've got the criteria simply set as =[Forms]!
[frmMemberOrganizations]![txtMembershipChoice] which works fine when a
choice has been selected, but when it's null, I get no results (all
Memberships have a type).

What's the syntax for what I'm trying to do?

Thanks!
 
J

Jeff Boyce

Consider an alternative ... a combobox rather than a textbox.

With a combobox, you can limit the user to selecting a valid "membership
type". If you use a textbox, they can:
* forget
* make spelling errors
* enter apparently valid types that are NOT in your membershiptype table
and then be confused why they aren't seeing anything...or everything.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
G

Grip

For the criterion on the Membership Type column enter the following as a
single line in design view:

[Forms]![frmMemberOrganizations]![txtMembershipChoice] Or [Forms]!
[frmMemberOrganizations]![txtMembershipChoice] Is Null

You'll find that after saving the query and opening it again in design view
Access will have moved things around.  Don't worry; it will work just the
same.

I've got a table of Memberships and a table of Membership types.  I'd
like to build a reporting interface that has an unbound box that
allows users to select from the list of membership types and find
those memberships (among other search criteria).  If the box is left
blank, the user should find all memberships regardless of type.
So I built the form, added the text box, and named it.  I'm in the
middle of building the query that should run after users enter in
their criteria.  I've got the criteria simply set as =[Forms]!
[frmMemberOrganizations]![txtMembershipChoice] which works fine when a
choice has been selected, but when it's null, I get no results (all
Memberships have a type).


Thanks. That's easy!

G
 
Y

yamakamiã„ã‚‹ã‹

watasiha,

dousitara,iinodesyouka?!!

watasiha,

utaga,daisuki,

daikirainahatoha,

zettaini,

yurusanai!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


トラジã€ã‚¹ãƒˆãƒ¼ã‚«ãƒ¼ã€ã ã‹ã‚‰ã€ã“ã“ã«ã€ã„ãŸã„ã‘ã©ã€

æã„ã®ã§ã€å±…ãŸããªã„ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼

ç§ã¯ã€ç´„æŸã—ãŸã“ã¨ã¯ã€ã‚«ãƒ©ã‚ªã‚±ã§ãƒ¼ã™â™ª

ç§ã£ã¦ã€ã©ã‚“ãªå­˜åœ¨ã§ã™ã‹ï¼Ÿï¼ï¼

ç§ã¯ã€æ­ŒãŒå¤§å¥½ããªã ã‘ã€ã§ã™ã‚ˆï½žï½žï½žâ™ªâ˜†


ã©ã†ã™ã‚Œã°ã€å‹é”ã«ã€ãªã‚Œã¾ã™ã‹ï¼Ÿï¼Ÿï¼Ÿï¼ï¼ï¼


watasiha,

dokoni,

ikeba,

iinodesyouka??!!


watasiha,

borantyia!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


watasiha,

ge-sen,nania,dehanaidesukedo,

zennbu,ge-sen,de,

å–ã£ãŸã‚‚ã®ã°ã‹ã‚Šã§ã€æš®ã‚‰ã—ã¦ã„ã¾ï½žï½žï½žã™â˜†

ç§ã¯ã€å‹é‡Œã¨ã€ç”³ã—ã¾ã™ï¼ï¼ï¼


ãˆã³ã¡ã‚ƒã‚“ã®ã€å‹é‡Œã¨ã€åŒã˜ã§ãƒ¼ã™â™ª
 

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