Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comboboxes - Using Multiple Columns and update table

Status
Not open for further replies.

acnovice

Programmer
Jan 27, 2005
100
US
Hi,

I have unbound ComboBox which displays several columns on "frmInvoice" form.
When a user chooses a "Company Name" from combo box, the several text fields display the associated address.
The unbound Combo box AfterUpdate() codes are following.

Private Sub Select_a_Customer_AfterUpdate()

Me![CompanyName] = Me![Select a Customer].Column(0)
Me![Street1] = Me![Select a Customer].Column(1)
Me![Street2] = Me![Select a Customer].Column(2)
Me![City] = Me![Select a Customer].Column(3)
Me![State] = Me![Select a Customer].Column(4)
Me![Zip] = Me![Select a Customer].Column(5)

End Sub

The combo box data come from "tblCustomer".

After display the address with company name, I want to save the "frmInvoice" form to "tblInvoice" table.

How do I save the data to the tblInvoice ?
Any help will be appreciated.



 
Why isn't frmInvoice bound to tblInvoice ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV,

I wanted to bring customer information from "tblCustomer" instead of "tblInvoice". I realize that it's not really necessary.

So I tried the way that you mentioned... and it works fine now.

I appreciate your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top