Thanks, That did exactly what I needed it to do.
With Warm Regards,
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265 Ext. 130
Fax (605)964-1070
"Anyone who claimed that old age had brought them patience was either lying or senile."
From: "Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>
To: Access Professionals Yahoo Group <ms_access_professionals@yahoogroups.com>
Sent: Wednesday, April 15, 2015 5:57 AM
Subject: RE: [MS_AccessPros] Updating multiple textboxes from a combo box
Domenico,
Let's assume the combo box is bound to the primary key field [EmployeeID] from an employee table and the other text boxes are the First Name and Last Name of the employee. The form is bound to an Employee Training table. You would only want to store the EmployeeID in the training table. Storing the employee's first and last name in the Employee Training table would go against normalization principles.
There are some situations where you want to capture and store the related columns such as a sales table where you would select the product from the combo box and update the current price in the sales record.
In Art's situation the table structures and business needs aren't known (to us) so I was just suggesting a caution.
Duane Hookom, MVP
MS Access
To: MS_Access_Professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Wed, 15 Apr 2015 09:20:22 +0200
Subject: RE: [MS_AccessPros] Updating multiple textboxes from a combo box
Let's assume the combo box is bound to the primary key field [EmployeeID] from an employee table and the other text boxes are the First Name and Last Name of the employee. The form is bound to an Employee Training table. You would only want to store the EmployeeID in the training table. Storing the employee's first and last name in the Employee Training table would go against normalization principles.
There are some situations where you want to capture and store the related columns such as a sales table where you would select the product from the combo box and update the current price in the sales record.
In Art's situation the table structures and business needs aren't known (to us) so I was just suggesting a caution.
Duane Hookom, MVP
MS Access
To: MS_Access_Professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Wed, 15 Apr 2015 09:20:22 +0200
Subject: RE: [MS_AccessPros] Updating multiple textboxes from a combo box
Duane Hi
I use this Technical . why is not typically recommended
Thanks a lot
Domenico
Domenico
Il 15/apr/2015 12:17 AM, "Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com> ha scritto:
Art,
You can set the control sources to expressions like:
=cboTenant_Unit.Column(1)
If you think you need to store the value from the columns in the combo box (not typically recommended) you would use code in the after update event of the combo box like:
Me.txtUnitID = Me.cboTenant_Unit.Column(1)
Duane Hookom, MVP
MS Access
Date: Tue, 14 Apr 2015 14:22:04 -0700
Subject: [MS_AccessPros] Updating multiple textboxes from a combo box
I have a combo box called cboTenant_Unit with a record source of:
SELECT qry_Tenant_List.CustID, qry_Tenant_List.UnitID, qry_Tenant_List.TenantName FROM qry_Tenant_List;
I display all three fields when it opens up. I also have two textboxes called txtUnitID and txtCustID. What I would like to do is update txtUnitID with the contents of UnitID and txtCustID with CustID from the combo box and updated as it changes content.
Is there a way to achieve this? I am guessing there is a way to reference each column in the combo box.
Thank you,
Art Lorenzini
Sioux Falls, SD
__._,_.___
Posted by: Art Lorenzini <dbalorenzini@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (5) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar