transfer data from a subform into a table

G

Guest

I have a form called Invoices which is created from a table called Invoices.
Within this form is a subform where i can select a customer and display their
address within the sub form. I select the customer from the subform using a
combo box named CustomerID. What im trying to do is once the CustomerID value
has been selected from the combo box i want to transfer it to the table
Invoices into a feild named CustomerID. Can anyone help??
 
G

Guest

Table design :

Invoice (InvoiceId , CustomerID , ...)
Customer(CusttomerID, Name...)

One customer can have many invoices ...

On the parent form , you need to add a control which control source is based
on Invoice.customerID ( you could make invisible ?) you can name it :
zhtxtCustID

when you click the combo box on that subform (cboCustID) assign :

me.parent.form!zhtxtCustID = me!cboCustID.column(0) .


I am assuming that your combo box on the subform based on two
field(CustomerID,Name) .

You could omit the column(0) part because by it is the default .
 

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