PC Review


Reply
Thread Tools Rate Thread

Check boxes to run queries

 
 
Natalie
Guest
Posts: n/a
 
      28th May 2010
Hi,

I want to use check boxes to choose criteria. I was to return a table for
the following data:

Invoice number, Customer number country, part number, qty, value etc.

There are 5 countries, I want to have a check box for each so we can choose
which ones to include, and then click GO.

How do I do this? I am new to this.

Thanks

Natalie
 
Reply With Quote
 
 
 
 
Tom van Stiphout
Guest
Posts: n/a
 
      28th May 2010
On Fri, 28 May 2010 06:25:01 -0700, Natalie
<(E-Mail Removed)> wrote:

I'm not sure I understand. Typically an invoice is for a customer, and
that customer has a billing address in some country. Why would you
want to select countries?
Maybe you only want to include invoice lineitems for work performed in
certain countries?

More info, please.

-Tom.
Microsoft Access MVP


>Hi,
>
>I want to use check boxes to choose criteria. I was to return a table for
>the following data:
>
>Invoice number, Customer number country, part number, qty, value etc.
>
>There are 5 countries, I want to have a check box for each so we can choose
>which ones to include, and then click GO.
>
>How do I do this? I am new to this.
>
>Thanks
>
>Natalie

 
Reply With Quote
 
Al Campagna
Guest
Posts: n/a
 
      28th May 2010
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.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

"Natalie" <(E-Mail Removed)> wrote in message
news98B5A18-10C2-4687-AAFB-(E-Mail Removed)...
> Hi,
>
> I want to use check boxes to choose criteria. I was to return a table for
> the following data:
>
> Invoice number, Customer number country, part number, qty, value etc.
>
> There are 5 countries, I want to have a check box for each so we can
> choose
> which ones to include, and then click GO.
>
> How do I do this? I am new to this.
>
> Thanks
>
> Natalie



 
Reply With Quote
 
Natalie
Guest
Posts: n/a
 
      28th May 2010

Thanks for your reply.

This is because we are looking at the international sales for the company on
certain products, so I i want the product specialists to be able to choose
what data they include from the table.

Does this make sense?
 
Reply With Quote
 
Natalie
Guest
Posts: n/a
 
      28th May 2010
Sorry, I'm not sure I understand. I want them to be able to select multiple
countries, all or just one.
Not sure how to do the combo box.

Thanks

Natalie
 
Reply With Quote
 
Tom van Stiphout
Guest
Posts: n/a
 
      29th May 2010
On Fri, 28 May 2010 10:17:15 -0400, "Al Campagna"
<(E-Mail Removed)> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Queries with check Boxes John W. Vinson Microsoft Access Queries 0 10th Jun 2009 09:06 PM
Queries with check Boxes Denise Microsoft Access Queries 0 10th Jun 2009 08:26 PM
Check boxes and queries Garry Microsoft Access Forms 2 4th Feb 2008 08:52 PM
Check Boxes / Queries =?Utf-8?B?cnNoZWQ=?= Microsoft Access Queries 3 9th Nov 2006 01:31 PM
Check Boxes and Queries =?Utf-8?B?QmVsaW5kYQ==?= Microsoft Access 1 17th Feb 2004 12:36 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:46 PM.