473,403 Members | 2,323 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,403 software developers and data experts.

How do I count gender if a checkbox in another field of a table is checked in access

Hi currently I am working on trying to count whether a particular tutor is male or female. I have a table that has gender information and I want to count when a checkbox is checked saying they are an active tutor in a query. I'm very new with this stuff so bear with me...this is my code currently->


Expand|Select|Wrap|Line Numbers
  1. MaleTutor: 
  2. (select IIf(Tbl_TutorInfo.[Tutor Status]=True
  3.    , (Count(IIf([Gender]=”Male”,0)) 
  4. from  (select [Gender] 
  5.    from tbl_tutorinfo inner join  tbl_tutorplace 
  6.       on [Tbl_TutorPlace].[Tutor]= [Tbl_TutorInfo].[Tutor] 
  7.    where (isnull([end date]) 
  8.          or [end date] >=[forms]![mnu reports]![semestercut]) 
  9.          and year = [Forms]![Mnu Reports]![Year] 
  10.          and semester =[forms]![mnu reports]![semester])),0))
Apr 26 '16 #1
1 946
Seth Schrock
2,965 Expert 2GB
It looks like you are trying to do this via a query. Try the following query:
Expand|Select|Wrap|Line Numbers
  1. SELECT [Gender], Count(tbl_tutorinfo.Tutor) As TutorCount 
  2. FROM tbl_tutorinfo inner join tbl_tutorplace on [Tbl_TutorPlace].[Tutor]= [Tbl_TutorInfo].[Tutor] 
  3. WHERE (isnull([end date]) or [end date] >=[forms]![mnu reports]![semestercut]) 
  4.     AND [year] = [Forms]![Mnu Reports]![Year] and semester =[forms]![mnu reports]![semester]
  5.     AND Gender = 'Male'
  6. GROUP BY Gender
Apr 27 '16 #2

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

Similar topics

1
by: zbobby | last post by:
Created a checkbox and added it to a table row NewCell = NewTableCell Dim NewCheckBox As New CheckBox NewCell.Controls.Add(NewCheckBox) NewRow.Cells.Add(NewCell) I know how to reference the...
8
by: Vladimir | last post by:
Hello, I have a table in MS Access database. It has one field (with BYTE datatype) that has several properties set in Lookup tab of table Design View. Display Control = Combo Box. Row Source...
3
by: Jenni | last post by:
Sorry about the unwieldy title, it's difficult to describe it in any other way. Basically I have a table in Access 97 which contains a number of records in different states. When originally...
9
by: geronimo_me | last post by:
Hi, I am atempting to compare part of a field with the whole of another field in access. Is this possible? Basically I have 2 tables with the following info: Table1 Field1 = MR.
1
by: dx | last post by:
I'm extremely frustrated with ASP.NET...again! To me this should be as simple as setting oCheckBox.Checked = True.. yet for some reason it isn't. I have a user control (ascx) that that has a...
7
by: DP | last post by:
hi, how would u do a count for somthing that is checked, in a check box?? this is wat i've got so far, but its coming out with an error; =DCount("Available","tblFilm","='Checked'") i;ve...
1
by: WebArtist8248 | last post by:
Hi all, Trying to figure out how to use a checkbox in a form and have JavaScript populate another field. For instance, I have 2 fields: DaytimePhone and EveningPhone and I have a checkbox that...
1
by: rharding | last post by:
I have a SQL database which contains a table (TblA) with a field (Fld1) defined as "bigint". When the SQL table is linked to Access the design view of the linked table shows this field as a data type...
3
MattFitzgerald
by: MattFitzgerald | last post by:
I have a main menu ("Frm_Startup") which contains a drop down box for selecting a field "LE ID" from my customer table where the "LE ID" is the primary key and there is another field with the...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.