Multiple Child Links

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

Guest

Hi
I have a main form which has 2 tables set as record set.
There are 2 combo box, cboStoreNo, cboReferenceID and I would like the
subform to show all the data based on which ever combo box has the data in it.

Code has been created for the combobox before update to set the other
combobox as null so only one combobox has data at one time.

One solution I tried was to have a hide text box in the main form which
works great but I cannot get any code to set the child link as it can be
either StoreNo or ReferenceID depending on the combobox selected.

Any thoughts would be appreciated.

Thanks
Noemi
 
Why not trying them both seperating them via a ; so it could look something
like this:

cboStoreNo;cboReferenceID

hth
 
Hi
I have a main form which has 2 tables set as record set.
There are 2 combo box, cboStoreNo, cboReferenceID and I would
like the subform to show all the data based on which ever
combo box has the data in it.

Code has been created for the combobox before update to set
the other combobox as null so only one combobox has data at
one time.

One solution I tried was to have a hide text box in the main
form which works great but I cannot get any code to set the
child link as it can be either StoreNo or ReferenceID
depending on the combobox selected.

Any thoughts would be appreciated.

Thanks
Noemi
after clearing the other combobox, set the
me.Child1.LinkChildFields = "StoreNo" or
me.Child1.LinkChildFields = "ReferenceID" as applicable.

Change Child1 to the value that's in the subform's name
property, not the value of the Source Objext property (they may
be different.

you may need a me.child1.requery in the afterupdate events of
the comboboxes.
 
Hi Bob
thank you it worked however the only problem I am having now is that the
records shown are multipled. How do I get it to only show the one record.
Thanks
Noemi
 
Hi Bob
thank you it worked however the only problem I am having now
is that the records shown are multipled. How do I get it to
only show the one record. Thanks
Noemi
Your underlying recordset has multiple records with the same
data, which is the correct one ? Is there an additional pair of
link fields that we need to add to the code? (you did not
mention any in your original post)


Bob Quintal said:
after clearing the other combobox, set the
me.Child1.LinkChildFields = "StoreNo" or
me.Child1.LinkChildFields = "ReferenceID" as applicable.

Change Child1 to the value that's in the subform's name
property, not the value of the Source Objext property (they
may be different.

you may need a me.child1.requery in the afterupdate events of
the comboboxes.
 
Hi Bob
Its okay, I actual had the data multiple times in my table which I have no
idea how I did it but have now removed it.
Thanks for your help.
Noemi

Bob Quintal said:
Hi Bob
thank you it worked however the only problem I am having now
is that the records shown are multipled. How do I get it to
only show the one record. Thanks
Noemi
Your underlying recordset has multiple records with the same
data, which is the correct one ? Is there an additional pair of
link fields that we need to add to the code? (you did not
mention any in your original post)
 
Back
Top