View Full Version : how do I use a query in a text box


JonatABS
07-29-2003, 09:15 AM
I want to use a query in a text box.

I have to use this query to give a total of a column ina table.

Is there an easier way then a query

The only way I know how to use a query is in a list.

Thanks

pdx_man
07-29-2003, 11:07 AM
Check out the DSum function in Access Help. Your syntax for the Control Source of the Text Box would look like:

=DSum("TheFieldToBeTotaled","TheRecordSource","YourID = " & Me.FormRecordID)

JonatABS
07-29-2003, 11:19 AM
Ok I got it displaying the total in the box

this is the formula I used and it works:
=DSum("yeartotal","cowyearlist")

I however want now this total to update a field in another table.

The table name is Employeeinfo
the field name is lifecow totals
the row to put the value under is named employeeid

pdx_man
07-29-2003, 11:26 AM
Your Help files must not be installed correctly or you are making a typo.
HERE (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaac10/html/acfctdsum.asp) is the link to the same help topic at Microsoft.