Linking more than two forms?

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

Guest

I have a main form "Rental Details" with a Tab control. Each Tab has a
subform that is linked to the main form. Both subforms are linked to the main
form by the fields CustomerID and TransactionID. The problem I am having is
when I enter data in Tab "Received", subform "ReceivedRental" I want to
automatically add a matching record to the to the Tab "Shipped" subform
"ShippedRental" via the ProductID field in both subforms. My first thought
was to link the two subforms but since the they are already linked to the
main form I can't link a subform to both a main form and another subform. Can
I? So I thought I could copy the ProductID in an after update event by the
following code:

ShippedRental.Form!ProductID = ReceivedRental.Form!Product

But that does not work as I get a runtime error 424 Object required. I
obviously have the format for this code wrong. How should it be formatted?
And is there a better way to add a record to the subform matching the
ProductID?

Thanks,

Dennis
 
Sorry code should have been:
ShippedRental.Form!ProductID = ReceivedRental.Form!ProductID

Dennis
 
Back
Top