populating fields on a form from a bound combo box

cbrace09

Registered User.
Local time
Yesterday, 17:07
Joined
Jun 5, 2009
Messages
25
My Goal:

1) To ignore any null values from the combo box columns (1-7)
*Note - Column(0) is the company name, which is the primary key of tblCompany

2) Populate txtboxes (WorkPhone, WorkExt, FaxNumber, Address, City, State, Zip) on frmContactsHome with the values of corresponding columns of the combo box.

I have the following tables and forms:
tblContacts - frmContactHome
tblCompany - frmCompany
tblCustomerAccounts - frmCustomerAccount

Basically, I have a form (frmCompany) that contians data about each company name (primarykey)

I want to be able to copy the company address fields for a selected company in my combo box on frmContactsHome.

I can do all of this expect when there is a null vaule in any of the columns of the combo, I get the message that the value can not be null.

Any ideas?
 
It sounds like the text boxes are bound to a table field that does not allow null values. If so, why are you rewriting these values to a table?
 
Yes, the fields being populated are bound to fields in the customer accounts table.

The reason i want to copy the data is because the customer account may have a different address than contacts or companies attached to that account but if it is the same as say a contact or company enrty, then i want to copy it to the customer account entry.
 
Change the customer table design to allow null values in these fields. You will need to test them at order time to ensure you don't have an order with no delievery address.
 

Users who are viewing this thread

Back
Top Bottom