Reference unbound form to table

Gavx

Registered User.
Local time
Today, 18:15
Joined
Mar 8, 2014
Messages
155
I have a form based on tblImport. This table is related to tblAccounts.
On the form I have a combo box that lists all the possible accounts that are within tblImport.
I want to put a text box on the form that references the field "Balance" in tblAccounts that corresponds to the account chosen in the combo box on the form.

As a starting point in the Control Source for this text box I have entered =[tblAccounts]![Balance] (I know this doesn't address the Account criteria) but am getting a #Name? response.
What is my problem please?

thanks for any help.
 
Good morning,

Have you considered basing the form on a query instead of a table? If the relationship is defined correctly, you should be able to include the Balance field in the query and edit as needed...
 
Can't reference a table directly like that.

Why is combobox RowSource based on tblImport and not tblAccounts?

1. Have combobox RowSource be a query that includes tblAccounts, then an expression in textbox can reference combobox column by index

2. DLookup() expression in textbox

3. Include tblAccounts in form RecordSource.
 

Users who are viewing this thread

Back
Top Bottom