Check Box Grouping

  • Thread starter Thread starter EllenM
  • Start date Start date
E

EllenM

Hello,
When I group on a check box field, I get duplicate records. Would anyone
know why this would happen?

Ellen
 
What happens if you change your Grouping and Sorting expression to:
=IIf([YourYNFieldName],"A","B")
 
Why would you group on a check box? I would think you would apply criteria
only to get either Yes or No's.

Post your query SQL.
 
Here's my query SQL: SELECT GRNs_In_The_System.ID, GRNs_In_The_System.Date,
GRNs_In_The_System.[FOI Number], GRNs_In_The_System.Subtype,
GRNs_In_The_System.Docnum, GRNs_In_The_System.InSystemNotStarted,
GRNs_In_The_System.[sent copyright to Rich], GRNs_In_The_System.[ready for
redaction], GRNs_In_The_System.[ready for the web], GRNs_In_The_System.[on
web], IIf([InSystemNotStarted]+[sent copyright to Rich]+[ready for
redaction]+[ready for the web]+[on web]=0,1,0) AS NoChecks,
GRNs_In_The_System.[Amendments/Supplements],
GRNs_In_The_System.[Amendments/Supplements posted]
FROM GRNs_In_The_System;
Thanks so much in advance for your help,
Ellen
 
Your first post said "When I group on a check box field, I get duplicate
records." but I do not see any grouping in your SQL. Where are you grouping?

By the way your table structure is wrong for a database as it is like a
spreadsheet.

This structure with a one-to-many relationship will work better --
GRNs_In_The_System --
DocID – Autonumber – primary key
Date
[FOI Number]
Subtype
Docnum

GRNs_Status --
StatusID – Autonumber – primary key
DocID – number – long integer - foreign key
Status – text –
- InSystemNotStarted
- [sent copyright to Rich]
- [ready for redaction]
- [ready for the web]
- [on web]
- [Amendments/Supplements]
- [Amendments/Supplements posted]
StatusDate – DateTime

This data structure lets you query the status easier.

--
Build a little, test a little.


EllenM said:
Here's my query SQL: SELECT GRNs_In_The_System.ID, GRNs_In_The_System.Date,
GRNs_In_The_System.[FOI Number], GRNs_In_The_System.Subtype,
GRNs_In_The_System.Docnum, GRNs_In_The_System.InSystemNotStarted,
GRNs_In_The_System.[sent copyright to Rich], GRNs_In_The_System.[ready for
redaction], GRNs_In_The_System.[ready for the web], GRNs_In_The_System.[on
web], IIf([InSystemNotStarted]+[sent copyright to Rich]+[ready for
redaction]+[ready for the web]+[on web]=0,1,0) AS NoChecks,
GRNs_In_The_System.[Amendments/Supplements],
GRNs_In_The_System.[Amendments/Supplements posted]
FROM GRNs_In_The_System;
Thanks so much in advance for your help,
Ellen

KARL DEWEY said:
Why would you group on a check box? I would think you would apply criteria
only to get either Yes or No's.

Post your query SQL.
 
Thanks so much for your help, Karl. Forgive me for my ignorance but, I
wanted to sort on the check box. It has worked out well.

Ellen
 
Back
Top