How to Autoupdate a Combobox based on a Checkbox

knakodkar

New member
Local time
Today, 05:29
Joined
Apr 5, 2007
Messages
2
Hello everyone,

I am new with this forum.

I have a form that has four different check box as 1 - Soldermask, 2 - Legend, 3 - Carbon, 4 - Scoring with (Yes/No) operation. Based on each yes or no selection, I want to be able to pull operation description on second form.

For instance, if I pick Soldermask - Yes (on form One), then form Two (has four combo boxes) that should provide me a filtered operation for Soldermask only.

If I don't pick Soldermask, but if I pick Legend then the same combo boxes should provide me filtered operations for Legend only.

How would I do this, I am not good with VBA, or SQL and I am really new with Database myself. Please provide me some guidelines.

Thanks in advance,
 
Hello everyone,

I am new with this forum.

I have a form that has four different check box as 1 - Soldermask, 2 - Legend, 3 - Carbon, 4 - Scoring with (Yes/No) operation. Based on each yes or no selection, I want to be able to pull operation description on second form.

For instance, if I pick Soldermask - Yes (on form One), then form Two (has four combo boxes) that should provide me a filtered operation for Soldermask only.

If I don't pick Soldermask, but if I pick Legend then the same combo boxes should provide me filtered operations for Legend only.

How would I do this, I am not good with VBA, or SQL and I am really new with Database myself. Please provide me some guidelines.

Thanks in advance,

Create a separate table for each selection (Soldermask, Legend, Carbon, and Scoring) then leave the Control Source and Row Source blank for the comboboxes. Use a case statement for the AFTERUPDATE event of the Checkboxes. (you can search the forum for more on that). Then depending on the case selected, the program will use the appropriate Control Source and Row Source to load the combos.

Something like

Case

1: Me.Combo1.ControlSource = "tblOne"
Me.Combo1.RowSource = "SELECT DISTINCT TblOne.* FROM TblOne"
Me.Combo2.ControlSource = "tblTwo"
Me.Combo2.RowSource = "SELECT DISTINCT TblTwo.* FROM TblTwo"


2: Me.Combo1.ControlSource = "tblThree"
Me.Combo1.RowSource = "SELECT DISTINCT TblThree.* FROM TblThree"
Me.Combo2.ControlSource = "tblFour"
Me.Combo2.RowSource = "SELECT DISTINCT TblFour.* FROM TblFour"

And so on ...
 
Wiz47 I am sorry, though, it's not working properly. Let me rephrase my problem.

I have Two Tables, One Form

I have Table One with ID (PK), Soldermask, Legend, Carbon, Scoring = all as Yes/No selection.
On Table Two I have Description One, Description Two, Description Three which should display operation code based on the Yes/No selection.

For instance, If I check Soldermask as Yes = then Description one should filter operation for the soldermask only. If I check Soldermask and Legend then Description should display operations for the Soldermask and legend only and so on.

I am really confused and lost, I need to get done with this asap and forget about it. I hope you could help me.

Thanks in advance
 

Users who are viewing this thread

Back
Top Bottom