Text box help

G

Guest

I have a form with a unbound text box named "totals" this text box sums my
"packages" field, =sum([packages]) I need the text box "totals" to be
cleared at the start of a new day is this possible? I am not using any querys
at this time.
Thanks
 
G

Guest

If your form is based on a table, the textbox will always sum up the
[packages] field for all records in the table. For it to reset each day, you
need to change the query that the form uses to fetch its "daily" data OR
change the textbox's recordsource to fetch the daily totals on its own.

I'm assuming you want the form to list all records, and that it has a Date
field, so.....

You *could* use a function, for example that sums up the daily packages.
=DSum("packages";"YourTableThatHoldsPackages";"Format(YourDateField,''yyyymmdd")=Format(Now,"yyyymmdd"))

....or something similar to this.

Ray
 
G

Guest

Hi Ray,

Thanks for your quick reply, yes my record sourse for my form is a table,
"Maintbl"
and all my text boxes use this table, I have not setup a select query for
this yet, do I need a query if i use the Dsum function?






Ray Cacciatore said:
If your form is based on a table, the textbox will always sum up the
[packages] field for all records in the table. For it to reset each day, you
need to change the query that the form uses to fetch its "daily" data OR
change the textbox's recordsource to fetch the daily totals on its own.

I'm assuming you want the form to list all records, and that it has a Date
field, so.....

You *could* use a function, for example that sums up the daily packages.
=DSum("packages";"YourTableThatHoldsPackages";"Format(YourDateField,''yyyymmdd")=Format(Now,"yyyymmdd"))

...or something similar to this.

Ray

Richard said:
I have a form with a unbound text box named "totals" this text box sums my
"packages" field, =sum([packages]) I need the text box "totals" to be
cleared at the start of a new day is this possible? I am not using any querys
at this time.
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