Limiitng content of combo boxes on a subform

G

Guest

Here goes:

I've got a sub form with two combo Boxes (cboType-the primary category and
cboType2-a secondary category furyher narrowing Type). I've go it set up so
when user selects somehting in cboType, cboType2 is limted to those secondary
topics associated with Tyte selected--no problem there using AfterUpdate and
a query.

Here's the problem--when I exit the form and open it back up, cboTypes are
all filled, but only the first line of the subform shows cboType2 (the
correct information is reflectingin in the table, however).

Any hints?

The
 
G

Guest

Link the second combo to the first combo using the RowSource

In the second combo row source write SQL like

Select Field1, Field2 From TableName Where FieldName =
Forms![FormName]![SubFormName].Form![Combo1Name]

On the after update event of the first combo write the code
Me.Combo2Name.Requery
 
G

Guest

Ofer,

Thanks for the help, but I just noticed I left out a key piece of
information--the subform is a continous form (as there can be more then one
Type per record).

Thanks again, and sorry for the omission.
--
Rich F


Ofer said:
Link the second combo to the first combo using the RowSource

In the second combo row source write SQL like

Select Field1, Field2 From TableName Where FieldName =
Forms![FormName]![SubFormName].Form![Combo1Name]

On the after update event of the first combo write the code
Me.Combo2Name.Requery

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



Rich F said:
Here goes:

I've got a sub form with two combo Boxes (cboType-the primary category and
cboType2-a secondary category furyher narrowing Type). I've go it set up so
when user selects somehting in cboType, cboType2 is limted to those secondary
topics associated with Tyte selected--no problem there using AfterUpdate and
a query.

Here's the problem--when I exit the form and open it back up, cboTypes are
all filled, but only the first line of the subform shows cboType2 (the
correct information is reflectingin in the table, however).

Any hints?

The
 
G

Guest

It should work, try it



Rich F said:
Ofer,

Thanks for the help, but I just noticed I left out a key piece of
information--the subform is a continous form (as there can be more then one
Type per record).

Thanks again, and sorry for the omission.
--
Rich F


Ofer said:
Link the second combo to the first combo using the RowSource

In the second combo row source write SQL like

Select Field1, Field2 From TableName Where FieldName =
Forms![FormName]![SubFormName].Form![Combo1Name]

On the after update event of the first combo write the code
Me.Combo2Name.Requery

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



Rich F said:
Here goes:

I've got a sub form with two combo Boxes (cboType-the primary category and
cboType2-a secondary category furyher narrowing Type). I've go it set up so
when user selects somehting in cboType, cboType2 is limted to those secondary
topics associated with Tyte selected--no problem there using AfterUpdate and
a query.

Here's the problem--when I exit the form and open it back up, cboTypes are
all filled, but only the first line of the subform shows cboType2 (the
correct information is reflectingin in the table, however).

Any hints?

The
 
G

Guest

I did try it and I get the same thing--the second combo box is blank when I
view the record (but the info is there in the underlying table)--I was hoping
leaving out the fact it's a continous datasheet would have lead us to a
different solution.

Additionally, to get the cboType2 to show the data, I have to "reselect" the
data deom cboType and the secondary type only reflects for that record on the
continuous form...

Again, really appreciate your time and assistance!

--
Rich F


Ofer said:
It should work, try it



Rich F said:
Ofer,

Thanks for the help, but I just noticed I left out a key piece of
information--the subform is a continous form (as there can be more then one
Type per record).

Thanks again, and sorry for the omission.
--
Rich F


Ofer said:
Link the second combo to the first combo using the RowSource

In the second combo row source write SQL like

Select Field1, Field2 From TableName Where FieldName =
Forms![FormName]![SubFormName].Form![Combo1Name]

On the after update event of the first combo write the code
Me.Combo2Name.Requery

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



:

Here goes:

I've got a sub form with two combo Boxes (cboType-the primary category and
cboType2-a secondary category furyher narrowing Type). I've go it set up so
when user selects somehting in cboType, cboType2 is limted to those secondary
topics associated with Tyte selected--no problem there using AfterUpdate and
a query.

Here's the problem--when I exit the form and open it back up, cboTypes are
all filled, but only the first line of the subform shows cboType2 (the
correct information is reflectingin in the table, however).

Any hints?

The
 

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