pass form field to subform?

B

Brook

good day all,

I have the following forms and fields:

frminvoices
field1
field2
field3
frminvoicedetails subform
within frminvoicedetails subform I have frminvsubform

What I am trying to do is pass the field1, field2, field3 to the same field
names in my frminvsubform within my frminvoicedetails subform.

any suggestions?

Thanks,

Brook
 
J

John Vinson

good day all,

I have the following forms and fields:

frminvoices
field1
field2
field3
frminvoicedetails subform
within frminvoicedetails subform I have frminvsubform

What I am trying to do is pass the field1, field2, field3 to the same field
names in my frminvsubform within my frminvoicedetails subform.

If you REALLY REALLY want to do this, set the Master and Child Link
Field properties of frmInvoiceDetails to

<whatever is there now>;Field1;Field2;Field3

and the same for frmInvSubform.

HOWEVER... I can concieve of *no* proper relational reason to store
data from a mainform's Recordsource in a grandchild table!

Could you explain what these fields are, and why you feel called upon
to store them both in the main form's table and in frmInvSubform?

John W. Vinson[MVP]
 
B

Brook

Good day,

Thank you for the information, I set it up and it works, but doens't save
the fields passed to frminvsubform to the tblinventory? Any ideas?

The reason that I am wanting to store the values, is that each of my
inventory items are unique and that not one will ever be the same.

Brook

Thanks,

Brook
 
J

John Vinson

Good day,

Thank you for the information, I set it up and it works, but doens't save
the fields passed to frminvsubform to the tblinventory? Any ideas?

The reason that I am wanting to store the values, is that each of my
inventory items are unique and that not one will ever be the same.

Since I have NO trace of an idea about your table structure, the
Recordsources for the forms, or the master/child link fields you're
actually using, it's more than a bit difficult to say what might be
wrong.

And even if all the inventory items are unique, there is still no
reason I can see to store information about them redundantly.

Please give me a hand here... what are the relevant tables? What
fields are you trying to transfer? WHY is it important to store the
same three fields of information in two different tables, rather than
using a Query to link them to pick up the information?

John W. Vinson[MVP]
 
B

Brook

Good Day John,

I was wondering if there was a way to "pass" the data by using a formula
such as:
=[Forms]![frminvoices]![frminvoicedetailssubform].[Form]![invoicetype]

Thanks,

Brook
 
J

John Vinson

Good Day John,

I was wondering if there was a way to "pass" the data by using a formula
such as:
=[Forms]![frminvoices]![frminvoicedetailssubform].[Form]![invoicetype]

That will let you *display* the data, but not store it.

You'll need VBA code in some suitable event (the Subform's
BeforeUpdate perhaps) to "push" the value into a bound control:

Me!invoicetype = _ &

[Forms]![frminvoices]![frminvoicedetailssubform].[Form]![invoicetype]


John W. Vinson[MVP]
 

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