Updating Table from Form "Query-based" field

G

Guest

Hello all,

I have a from called BatchDetail, with fields. Data entry by the user(s)
updates a table called ExpenseReport.

Problem:
Some of the fields are NAME, DATE, EXPENSEACCT, AMOUNT. All these work and
update the table based on user entry. However, I added a new textbox called
DEPT. This is based on a DLOOKUP query and looks up the department based on
the value on EXPENSEACCT.

NB: Values entered into EXPENSEACCT are restricted and based on table
ACCTCODES. The fields of the ACCTCODES table are

i. ACCT
ii. DESCRIPTION
iii. DEPARTMENT

The DEPT value shows on the form but does not update the table. Kindly tell
me what to do. Thanks,
 
G

Guest

Did you bind the new DEPT text box on your form to the DEPARTMENT field in
your record set?
 
G

Guest

No. The DEPT text box Control Source is
=DLookUp("Dept","acctCodes","Account = " & Forms!frmAP_Batch!EXPENSEACCT)

Changing the control source to DEPARTMENT will require the user to manually
enter the DEPT for each record.

My hope is that I can "auto-lookup", which it does now and somehow link to a
field on the recordset. How do I do this. Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top