How can I reset a field to zero ...?

J

jorge

Hello my friends,

I Have a question:
How can I reset a field to zero on the first day of every month ?
I tried everything I knew (it´s not much of course), and this is driving me
crazy.

Thank u so much!
Take care and keep up your excelent work.
 
T

tina

first of all, are you using MS Access? if so, we need a lot more context -
there could be dozens of "reset a field to zero" depending on the
circumstances. suggest you describe your process, the purpose of the field
and the zero value, and where, when, and why you want to reset it.
 
J

jorge

Hi Tina,

Let me try to explain (I´m portuguese and my english is not very good)
Yes, I´m using Microsoft Access.
The field I´m trying to put to zero every first day of a month, is a
currency number.
This field is uptaded (not every day) by a sum of different fields. It´s a
goal I want to achieve in money. Every month I see if I got this goal or not
and how much is left to get that money. But that´s per month. That´s why I
want to every month the money reset to zero.

I wonder if you could can help me
And thanks for trying to help
 
T

tina

your English is okay, jorge. my first impression is that you should not be
adding together field values and saving that total into another field in a
table. that violates data normalization rules, and there's rarely a good
business or technical reason to do so. you must have some query, or
expression, or code, that you use to sum those different fields. standard
procedure is to use that whenever you need to calculate the sum and show it
in a form or report, whatever. that way the calculated value is always
current and accurate - you don't have to come up with some way to update a
table field at specified intervals.

if you're determined to save the calculated value into a table (which i
really, really do not recommend) then setting the value of the field back to
zero is as simple as running an Update query (see Help for details about
update queries, if you're not familiar with them). how to do it "once a
month only", can be more complex; it depends on whether you open the
database every day, or whether you're comfortable with scheduling a task to
open the database automatically to run the update...just how you go about
doing it depends on a lot of variables in both your database and the process
it serves.

hth
 
Top