Subform display based on combo box choice

  • Thread starter gmazza via AccessMonster.com
  • Start date
G

gmazza via AccessMonster.com

Hey there,
I'm trying to display information in a subform, based on the main form's
combo box.
The combo box's properties are the following:
Name: cboCriteria
RowSource: Select CriteriaId, CriteriaValue from Criteria Order by
CriteriaValue;
Bound Column: 1
Column Count: 2
Column Widths: 0";1"

The subform has a RecordSource of:
SELECT [CriteriaOption].[ClinicalTrialId],[CriteriaOption].[CriteriaId],
[CriteriaOption].[CriteriaOptionValue] FROM [CriteriaOption] where CriteriaId
= Forms!CriteriaOptions!cboCriteria

Its not working though, and I feel its because I am saying where CriteriaId =
the combo box, yet the combo box is displaying the CriteriaValue, not the
CriteriaId.

Could that be why?
 
B

Beetle

What matters is what is in the Bound Column of the
combo box, not what is displayed. It appears that
CriteriaID is the bound column, so what you posted should
work.

What do you mean by "it's not working"?

Did you put code in the After Update event of the combo box
to requery the subform?
 
G

gmazza via AccessMonster.com

I had the links wrong from child to master, you are correct Beetle, it should
work, and now does. Thanks for your help!
What matters is what is in the Bound Column of the
combo box, not what is displayed. It appears that
CriteriaID is the bound column, so what you posted should
work.

What do you mean by "it's not working"?

Did you put code in the After Update event of the combo box
to requery the subform?
Hey there,
I'm trying to display information in a subform, based on the main form's
[quoted text clipped - 17 lines]
Could that be why?
 
R

ryguy7272

Ok, this may require a few steps:
http://www.datapigtechnologies.com/flashfiles/combobox1.html

This should prove to be helpful too:
http://www.datapigtechnologies.com/flashfiles/subforms1.html
http://www.datapigtechnologies.com/flashfiles/subform2.html

All videos are available here:
http://www.datapigtechnologies.com/AccessMain.htm


HTH,
Ryan---




--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


gmazza via AccessMonster.com said:
I had the links wrong from child to master, you are correct Beetle, it should
work, and now does. Thanks for your help!
What matters is what is in the Bound Column of the
combo box, not what is displayed. It appears that
CriteriaID is the bound column, so what you posted should
work.

What do you mean by "it's not working"?

Did you put code in the After Update event of the combo box
to requery the subform?
Hey there,
I'm trying to display information in a subform, based on the main form's
[quoted text clipped - 17 lines]
Could that be why?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top