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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Properties to modify Combo Box on a Table 1

Status
Not open for further replies.

Valeriya

MIS
Jan 9, 2006
138
US
Hi Guys,
I'm creating a new table, which will eventually be used for the form.
Here the fields:

AirBill_Nbr (PK)
Date Received at MSD
Department Date Received
CustNbr
CustName

To eliminate data entry errors I've made the last two fields as combo boxes:
CustNbr Row Source:

Code:
SELECT [Q FedExLog_CusNbr_CustName].CustNbr FROM [Q FedExLog_CusNbr_CustName];

CustName Row Source:

Code:
SELECT [Q FedExLog_CusNbr_CustName].CustName FROM [Q FedExLog_CusNbr_CustName];

Trying to figure out is it possible somehow to set this property or any related control type that will populate the CustName field automatically according to the CustNbr field value?

Thank you in advance,

Valeriya
 
Another useful stuff to read:

In short, don't store CustName in the new table and set CustNbr as a ForeignKey referencing [Q FedExLog_CusNbr_CustName](CustNbr)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Many thanks to all of you!

PHV, I've set CustNbr as a ForeignKey.
But again is it possible to do the automatic fill out on the form instead of on table?
I mean, do I have to write a code or there is an option in a combo box properties that I can set up:
Every time user making his choice for the CustNbr field, the CustName combo box is auto completing with a name for that particular chosen customer number?

Thanks in advance for your great suggestions!!!

Valeriya
 
Once you have a form, you can have your combo perform as you wish. Your example has the customer number as column 0 and the customer name as column 1, so you can set the Control Source of a text box to:
=cboCustomer.Column(1)
 

PHV, I've created a form, and it perfectly works !
Thanks a lot!
Valeriya.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top