Click to See Complete Forum and Search --> : relating combobox and subform
spg
September 4th, 2001, 04:44 AM
I,ve a got a problem which is ...
i,ve got a combobox which is connected to a subform and when i click combobox should appear in the subform all the information related to combobox . i donīt know how to do it dinamic.
berta
September 4th, 2001, 04:50 AM
U can use the property form.tag of your subform to exchange the value of combo... or U can add some public properties to subform.
<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/images/bertaplanet.gif'>
</center>
berta
September 4th, 2001, 04:55 AM
using tag.
'in main form
private sub command1_click()
mysubform.tag = mycombo.listindex
mysubform.show
end sub
'subform module
private sub form_load()
msgbox me.tag
end sub
using public properties
'in main form
private sub command1_click()
mysubform.X_listindex = mycombo.listindex
end sub
mysubform.show
'subform module
public X_listindex as long
private sub form_load()
msgbox me.X_listindex
end sub
<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/images/bertaplanet.gif'>
</center>
spg
September 4th, 2001, 06:17 AM
Thanks, but i donīt know why but it still doesnīt work. The information that appears in the subform still the same no matter which is selected in the combobox. but is stange because no error message appears...
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.