473,379 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Set criteria dependent on check boxes.

I am new to access and VBA. I would like to use a form to get multiple criteria.
FIrstly can I do this from a list? How do you put more than one criteria into a query
Secondly if I want to use check boxes how do I get my check box to apply to my criteria.
EG I am looking at orientation. If they want all buildings that are orientated north and south. THey North and South check box are true. HOw do you assign so the criteria can if chkNorth is true, then criteria is north.

Thanks
Aug 20 '10 #1
3 3708
liimra
119 100+
Please note that "Check Box" number language is:
Yes/Checked = -1
No/Unchecked = 0

So this is the criteria
Expand|Select|Wrap|Line Numbers
  1. IIF([chkNorth]=-1,"North","South")
Of course the expression is very flexible to meet your needs.

To use multiple criteria in your query, simply use "AND" to seperate criteria; for example:

Expand|Select|Wrap|Line Numbers
  1. [chkNorth]=-1 And [chkSouth]=0
Regards,
Ali
Aug 22 '10 #2
Thanks that's a great help.
Aug 23 '10 #3
liimra
119 100+
Glad it worked for you. Would you kindly mark this post as answered
so it becomes more helpful for others.

Regards,
Ali
Sep 14 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Robert | last post by:
Stephen, I think I figured out the problem. I was able to get Check Boxes and Option Buttons to work on my form by TURNING OFF RECORD SELECTORS on the form. Not sure why this would make a...
1
by: James | last post by:
I am creating a system whereby equipment is inspected. Data is inputted into an inspection form. However, any equipment that is not satisfactory needs to have spare parts ordered for that piece of...
1
by: David | last post by:
Hi, I have a form with a sub-form. The Main form shows a selected product, and the sub-form shows the package contents for that product as follows: Item | Qty | Print (Checkbox) ...
3
by: Shannan Casteel via AccessMonster.com | last post by:
I have three main tables. The first is the table that my main form will be based on. This is where the user will enter all the data. The table is called TechnicalProblemsTable. It looks like...
8
by: Galina | last post by:
Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date. When faculty is selected, lists of lecturers and...
5
by: jimc52 | last post by:
Hello Everyone: I am hoping one of the gurus here will give me some help. I have designed a form with some check boxes. I put the checkboxes there on the form so later I could use them as flags on...
4
by: deanndra | last post by:
First, I want to say thank you to Scott and the others who replied to my first post here. I had to put that database on hold for the moment when I was tasked with a new one. I am building another...
3
by: dillneus | last post by:
hello, I have some problem with search menu. first i will explain the structure of my search mennu and then the problems that appears... For creating my search menu i have used tips from that...
1
by: jmartmem | last post by:
Greetings, I have a nagging problem with client-side dynamic dependent list boxes that perhaps someone can help me troubleshoot. I have a form with a series of dynamic dependent list boxes....
1
by: bkholloway | last post by:
hello...first time here...have an access 07 db and need to have multiple dependent combo boxes. I have a little experience using expression builder but not VBA...basically need to limit choices in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.