• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 293
  • Last Modified:

How to get text to display based on checkbox selection

I can not figure out how to get all the colored shirts to display in form "frmShirts" when the user selects the color or colors of the shirt they want to select from on form "frmShirts"

My DB is attached.

Any help is appreiciated.
CheckBox.accdb
0
cssc1
Asked:
cssc1
  • 7
  • 6
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I don't understand what you mean. Do you want the subform to show records when the user clicks on the associated checkbox?

Wouldn't it be better to have a table for Shirts, and a table for Colors, and a Join table to show which Shirts are available in which Colors?
0
 
cssc1Author Commented:
Q. Do you want the subform to show records when the user clicks on the associated checkbox?
A-Yes

___________________________
Q-Wouldn't it be better to have a table for Shirts, and a table for Colors, and a Join table to show which Shirts are available in which Colors?
A-I want the color options filtered. Why should the user view red when thay really want to view the Blue colors.


I hope this explains it?

0
 
GRayLCommented:
I think you have to set it up something like this.  I don't have A2007 on this machine but this should do it:

SELECT * from Shirts WHERE ShirtColor = Switch(
Forms!myColors!myFrame.Value=1,"Black",
Forms!myColors!myFrame.Value=2,"White",
Forms!myColors!myFrame.Value=3,"Red",
Forms!myColors!myFrame.Value=4,"Green");
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
cssc1Author Commented:
GRayL:
 I created a query, I think what you recommended in 10/09/11 04:25 PM, ID: 36939554, however, not working. Can you take a look at it. I converted the DB to MS Access 2000-2003.
Thanks
CheckBox.accdb
0
 
cssc1Author Commented:
GRayL:
 I created a query, I think what you recommended in 10/09/11 04:25 PM, ID: 36939554, however, not working. Can you take a look at it. I converted the DB to MS Access 2000-2003.
Thanks
CheckBox-IN-MSACCESS-2003.mdb
0
 
GRayLCommented:
From your question I gathered that you wanted to be able to 'filter' which shirts a customer would be shown based on the customer's selected color.  Now you show us four tables, one for each of three colors, tblGray, and tblYellow are conspicuous by their absence and each containing a combination with three other colors.  Then you show us four forms, one for each of the colors, and one for Shirts.  Curiously you have only one shirt in the table described as Crew Neck - Navy.  Where I come from Navy is also a color.  

Please take another cut at describing what you are trying to achieve.  I'm stumped.
0
 
cssc1Author Commented:
GRayL:
  Sorry, I will try better to describe what I am trying to accomplish. Maybe the best is to use screen shots to show what the user will see.
Step 1 and two are examples of a user who simply wants to select a Mens Crew Neck in one or more colors of Green. All other colors and shirt styles would work the same.
Step-1.jpg
Step-2.jpg
0
 
cssc1Author Commented:
GRayL:
   Does my ammended description help the description?
I hope it does.
Thanks
0
 
GRayLCommented:
Are you wanting to display the approriate frmColors in the subform areas depending on what is selected in frmShirts - none, or any combination of the three colors?
0
 
cssc1Author Commented:
Q-Are you wanting to display the approriate frmColors in the subform areas depending on what is selected in frmShirts - none,
A-Yes

Q-or any combination of the three colors?
A-no
0
 
GRayLCommented:
I've modified your mdb.  Is this what you want?
CheckBox-IN-MSACCESS-2003.mdb
0
 
GRayLCommented:
I should have modified the name by adding something like the following:

CheckBox-IN-MSACCESS-2003Rev1.mdb
0
 
cssc1Author Commented:
GRayL:
   YES!  Thanks so much for all your help!
0
 
GRayLCommented:
Thanks, glad to help.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now