Combo/Textbox control

T588

Registered User.
Local time
Yesterday, 19:33
Joined
Feb 3, 2003
Messages
65
This is what I'm trying to do:
I have a table(customers)with the following fields:
CustID,CustomerName,Address,City,State,Zip.

Currently, I have a form with a combobox(Customer)which is tied to the table CustomerName field, selecting a customer from the combobox dropdown list fills in 4 textboxes; Address,City,State,Zip positioned below the combobox on the form.

I need to add "Company" to the form.

I've add a "CompanyName" field to the customer table and I've added another combobox(Company)on the form.

All records will have a "CustomerName" BUT some records will have customers with no company name and I want the user the option of picking either a customer or a company from the 2 comboboxs and either one will cause the SAME 4 textboxes(Address, ect)will be filled.

I can't seem to be able to do this in an SQL query so I turning to vb.

Thanks
Vince
 
Why not add the companyName to the Customers table?

The Customers name Combo will fill in the Company if there is one and/or the company Combo will fill in the customers name.

Col
 
I did add a column "CompanyName" to the table.

This isn't so much for when entering in new customers but for entering new orders using exsisting customers and the user being able to enter the soldto/shipto info from picking an exsisting company or by picking an exsisting customer (a customer with no company association)

Vince
 
I've probably got the wrong end of the stick here, its Friday afternoon and nearly hometime so I'm a bit slow:(

If the companyName has been added as an afterthought, you'll need to update the existing customers details by using an update query.

The Orders form will be linked to the customer by an IdNo - you can draw the company and/or customer name details from the customer table as necessary.

Col
 
Already did the query update.....BUT the ID info is what I needed!
I never thought (more on that later!) about the ID column.
Right in front of my face.
Talk about being SLOW..........I'm a turtle!!

Thankyou very much!
Vince
 
Glad I could help - Friday afternoon is not my best time;)
Col
 

Users who are viewing this thread

Back
Top Bottom