Need help to use cascade combo box on a subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Everyone,

i have a main form and one subform. I have subform in datasheet view. i have
two problems with the cascaded combo boxes on the subform.
1- two combo boxes on the subform are vendor name and vendor number. i have
a table which contain vendor name and number. i want to select vendor name
and then i want to show appropraite vendor number.
the problem is when i chose vendor name the same name appears for all the
rows(may be because it is in datasheet view) want to avoid that if possible.
2- after choosing vendor name when i try to chose vendor number it asks for
a parameter value.

sorry if i was vague in explaining my problem...but ideally i would want
that when i select vendor name it only show for that row rather than
appearing for all the rows in the subform(which is in datasheetview).
secondly, i should be able to choose vendor number based on vendor
name.(Again i have a table which contains vendor Name and vendor Number).
 
When you enter a value in a field in a continues form, and all the recorords
show that value, it mean that this field is unbound, all you need to do is
bound that field to the appropriate field in the table that the sub form is
bound to.

Now what is the porint in choosing vendor name, and then vendor number, if
you save in the table the vendor number, then create one combo that include
in the row source both field
Select VendorNumber,VendorName From TableName

Create a text field in the subform, and in the control source of this field
you can write
=[ComboName].column(1)
That way you save the vendor number in the table, and display the vendor name.
 
thanks ofer for the help.
still my problem is with vendor Name and Number combo box. i did what you
said i.e. i created a combo box with a row source
Select VendorNumber,VendorName From TableName
so that gave me my Vendor Name from the vendor table.
and by created the text box the way you suggested vendor number appears but
again the same problems exit that the combobox is unbound and the same info
appears in all the rows.
Is there a way to tackle this in such a way that i can add two combo
boxes(cascaded) i.e. Vendor Name and Vendo Number in my subform and it works
for each row since i have a continuos suborm.
just to make things little more clear I have Vendor Table which contain two
column Vendor Name and Number.(i entered all the possible vendor name and
number in this table already). i want this info to use in the subform.
thanks in advance.

Ofer said:
When you enter a value in a field in a continues form, and all the recorords
show that value, it mean that this field is unbound, all you need to do is
bound that field to the appropriate field in the table that the sub form is
bound to.

Now what is the porint in choosing vendor name, and then vendor number, if
you save in the table the vendor number, then create one combo that include
in the row source both field
Select VendorNumber,VendorName From TableName

Create a text field in the subform, and in the control source of this field
you can write
=[ComboName].column(1)
That way you save the vendor number in the table, and display the vendor name.
--
I hope that helped
Good luck


THANX LW said:
Hi Everyone,

i have a main form and one subform. I have subform in datasheet view. i have
two problems with the cascaded combo boxes on the subform.
1- two combo boxes on the subform are vendor name and vendor number. i have
a table which contain vendor name and number. i want to select vendor name
and then i want to show appropraite vendor number.
the problem is when i chose vendor name the same name appears for all the
rows(may be because it is in datasheet view) want to avoid that if possible.
2- after choosing vendor name when i try to chose vendor number it asks for
a parameter value.

sorry if i was vague in explaining my problem...but ideally i would want
that when i select vendor name it only show for that row rather than
appearing for all the rows in the subform(which is in datasheetview).
secondly, i should be able to choose vendor number based on vendor
name.(Again i have a table which contains vendor Name and vendor Number).
 
In a form, the fields that you enter data into are bounded to a field in the
table, either wise there is no point in entering data, because it wont be
saved.
The Sub form is bounded to a table (the record source of the form), in the
sub form every data you enter should be saved in this table.
Check the control source of the combo, it is probably empty. click on the
field selection on the right and select the field where you want to save the
selection.

--
I hope that helped
Good luck


THANX LW said:
thanks ofer for the help.
still my problem is with vendor Name and Number combo box. i did what you
said i.e. i created a combo box with a row source
Select VendorNumber,VendorName From TableName
so that gave me my Vendor Name from the vendor table.
and by created the text box the way you suggested vendor number appears but
again the same problems exit that the combobox is unbound and the same info
appears in all the rows.
Is there a way to tackle this in such a way that i can add two combo
boxes(cascaded) i.e. Vendor Name and Vendo Number in my subform and it works
for each row since i have a continuos suborm.
just to make things little more clear I have Vendor Table which contain two
column Vendor Name and Number.(i entered all the possible vendor name and
number in this table already). i want this info to use in the subform.
thanks in advance.

Ofer said:
When you enter a value in a field in a continues form, and all the recorords
show that value, it mean that this field is unbound, all you need to do is
bound that field to the appropriate field in the table that the sub form is
bound to.

Now what is the porint in choosing vendor name, and then vendor number, if
you save in the table the vendor number, then create one combo that include
in the row source both field
Select VendorNumber,VendorName From TableName

Create a text field in the subform, and in the control source of this field
you can write
=[ComboName].column(1)
That way you save the vendor number in the table, and display the vendor name.
--
I hope that helped
Good luck


THANX LW said:
Hi Everyone,

i have a main form and one subform. I have subform in datasheet view. i have
two problems with the cascaded combo boxes on the subform.
1- two combo boxes on the subform are vendor name and vendor number. i have
a table which contain vendor name and number. i want to select vendor name
and then i want to show appropraite vendor number.
the problem is when i chose vendor name the same name appears for all the
rows(may be because it is in datasheet view) want to avoid that if possible.
2- after choosing vendor name when i try to chose vendor number it asks for
a parameter value.

sorry if i was vague in explaining my problem...but ideally i would want
that when i select vendor name it only show for that row rather than
appearing for all the rows in the subform(which is in datasheetview).
secondly, i should be able to choose vendor number based on vendor
name.(Again i have a table which contains vendor Name and vendor Number).
 
Back
Top