zeroing records (1 Viewer)

rick roberts

Registered User.
Local time
Today, 09:49
Joined
Jan 22, 2003
Messages
160
I have a button that backs up an application with the current date and forwards the existing date by a week this all works fine but I also want to set some records to zero after backup. can anyone put me on the right track. im using access 2010 but with 2007 format
thanks
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 09:49
Joined
Jul 9, 2003
Messages
16,426
There's not enough information for me to be able to understand the context of your question. In other words I can't help you until you have explained better your situation.
 

rick roberts

Registered User.
Local time
Today, 09:49
Joined
Jan 22, 2003
Messages
160
I have a table with rows of customers the customers have columns of various payments which are populated during the week. when the week is over I want to revert the figures in the columns to zero for a fresh start
the table is replicated in a form
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 03:49
Joined
Feb 28, 2001
Messages
27,515
It's your problem so I have to take your word for it, but it sounds to me like you are losing historical data by wiping certain fields. The further inference is that these payments are towards some debt, fee, subscription, or judgment. In order for us to give you a good answer, we need more than your simple description.

Step up one level higher and give us an overview of the intent, not the effect.
 

rick roberts

Registered User.
Local time
Today, 09:49
Joined
Jan 22, 2003
Messages
160
the data is for work done on different elements for each company they are billed for that particular week and so the data is returned to zero in order to start with a clean slate for the following week before data is zeroed the application is saved with the week number included
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 18:49
Joined
Jan 20, 2009
Messages
12,866
the data is for work done on different elements for each company they are billed for that particular week and so the data is returned to zero in order to start with a clean slate for the following week before data is zeroed the application is saved with the week number included

That is not the way to do it. There is no need to save the application for each week. The application can cover an indefinite period.

The bills should be assigned to a week by their dates and the status for a particular week queried against those dates.
 

rick roberts

Registered User.
Local time
Today, 09:49
Joined
Jan 22, 2003
Messages
160
will this system zero the entries on the following week if not then I have the same problem if they do then I have another problem since there are some static column figures that need to be retained
 

plog

Banishment Pending
Local time
Today, 03:49
Joined
May 11, 2011
Messages
11,695
Rick, what you are describing is a spreadsheet. Access is not Excel + Forms, it's a database and needs to be constructed as such.

In a database, data doesn't get moved, it doesn't get zeroed out, it doesn't have columns that are the same value for every record. The first and most important step in creating a database is normalization (https://en.wikipedia.org/wiki/Database_normalization). That is the process of setting up your tables. I'm pretty confident yours are not set up correctly.

The issue you are having doesn't apply in a properly normalized database. You simply just keep dumping data into a database and then you use queries to extract just the data you want based on logic. I suggest you read up on normalization, attempt it in your database, set up the relationship tool and then post a screenshot of it so we can better understand your database.
 

rick roberts

Registered User.
Local time
Today, 09:49
Joined
Jan 22, 2003
Messages
160
i have a different database that works in the way you suggest using week numbers to add the records but when I reach week 52 (end of year) I have to start again at week 1 so my dilemma still stands
 

Minty

AWF VIP
Local time
Today, 09:49
Joined
Jul 26, 2013
Messages
10,387
Then you also need to store the year. However as everyone else has stated ,if you simply stored the actual date then you can work out which week, month, quarter or anything else date wise.
 

Users who are viewing this thread

Top Bottom