A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Check boxes to run queries



 
 
Thread Tools Display Modes
  #1  
Old May 29th, 2010, 04:52 AM posted to microsoft.public.access.forms
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default Check boxes to run queries

On Fri, 28 May 2010 10:17:15 -0400, "Al Campagna"
wrote:

I'm afraid you missed the requirement of selecting multiple countries.

-Tom.
Microsoft Access MVP


Natalie,
Check out Option Groups in Access Help.
It allows you to group those 5 check boxes into a group, where
only one check box can be selected at a time, and gives each selection a
different numeric value. For ex. [optCountry].
The query can then determine that IF optCountry = 1 then it's "USA,"
or IF optCountry = 4 it's "Canada" etc...

BUT...
Now that will work... but it's clumsy... in that the query must
interpret
(using IFs) 5 numeric values to a textual equivalent. What happens when you
have 6 countries? 8 countries?
Each time you'll have to re-"IF" the query for the added numeric values.

I would suggest a combo box instead, (ex. cboCountry) with a Value List
of
all the countries as the RowSource. Then the query can take the combo value
directly in it's
SQL statement.
Country = Forms!SomeFormName!cboCountry
If another country is added... just add it to the combo's Value List,
and that's it...
nothing else to do.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.