Want to get the selected item in an Access Form combo box to display original table field in another text box
Posted on 2011-05-01
I am creating a "Translation Table" where a client's Chart of Accounts is assigned to the Account's Chart of Accounts (No, they don't use the same numbering systems)
I have two tables, One is tblCOA for the Client's COA and the other is tblAcctntCOA for the Accountant's Chart of Accounts
In the Client's tblCOA I have a field where you select the Accountant's COA. I have a relationship setup between the two tables.
I then created a query of tblCOA to get a list of all the Client's Accounts that hadn't been assigned to the Account's Chart of Accounts.
I am using that query of unassigned accounts to create a form for the user to select the Accountant's correct GL Account Number.
I have an Access Form created from the query of Unassigned accounts where I have an unbound combo box and an unbound text box. The user selects the Accountant's GL Acct in the combo box and I want to get the info from that combo box to populate a text box with GL Account's Description from the original table.
The form is created from a query of a Client's Acct List. That query is qryCOA_Accts_Unassigned
The combo box is cboAcctntGLAcctSelected
It's Row Source is:
SELECT [qryAcctntCOA].[Acctnt GL Nbr], [qryAcctntCOA].[Acctnt GL Descriptions], [qryAcctntCOA].[Acct Type] FROM qryAcctntCOA;
The text box is txtAcctntGLAcctSelected
On the unbound combobox on the Event Tab in On Change I tried:
=[txtAcctntGLAcctSelected]=[tblAcctntCOA].[Acctnt GL Descriptions]
It doesn't like that. I get The expression On Change ....error. The object doesn't contain the Automation object 'tblAcctntCOA'.