how to add a query field to a form

Mark1982

Registered User.
Local time
Today, 07:09
Joined
Jul 12, 2018
Messages
37
I Cant Add add the query field to a form. i am doing it by control source.
=([Query]![Annual Budget 2018])

its giving me error of (#Name?)
 
Use dlookup:

=Dlookup("fieldtoreturn","[Annual Budget 2018]")
 
Dear Arnel,

But my field is in Combo Box. and i want it dsum in my form.
 
Add a criteria:


=Dlookup("fieldtoreturn","[Annual Budget 2018]", "fieldname=" & combo)
 
My Combo Box name is Cost Control and the combo box have two fields:
1.By Proponent
2.By Payroll

i want to create a d sum for each one by annual budget 2018.
 
Dear Arnel,
I try it not working.

Please see the below:

table name is: Budget 33101
Field in the Table:
1:Expense Code
2:Annual Budget 2018
3:Cost Control (which is combobox) have two fields 1.By Proponent 2.By Payrol)

now i want to make dsum for each field of combo box to show me total of annul budget 2018.
 
There is no proponent or payroll code in the table.
 
Yes in previous there was no combo box but they told me to add. so i add it.
 
Dear Sir Arnel I send you my updated database in your email.
 

Users who are viewing this thread

Back
Top Bottom