Save query!

ChristopherL

Registered User.
Local time
Yesterday, 23:57
Joined
Jul 2, 2013
Messages
90
Hi!
I have just finished a report that saves values in a query.
This query contains values that change for each day, so what I would like to do is create a way to store this informaton in another query.

Basically I'd like to save data for each report-date.
And if you run the macro the same day I want it to replace that info with the new one.

So -> Save data for each day report date, if run on the same day then replace, and the next day append that for the new report date.

So it stores data for each report date :p

Anyone know a good structure with delete/append querys?
 
Data is stored in Tables.
Queries are a means to display/add fields/records in one or more tables; a delete query allows you to delete a record from a table.
Reports are a means to apply some calculations/manipulation on data in table(s) and display/print it.

I think you should tell us in plain English what your "business issue" is in terms you would use to tell someone in the McDonald's line who doesn't know you or Access or database. Pretend we know nothing of your situation (and we don't), WHAT would you say?
 
Ops yes, sorry about that.
I have a macro that runs through different append/delete querys and the last table called [SecondaryTrades] is a table that stores different values for the current day.

Each day this last table changes for each ReportDate.
What I want to make is a table that stores the history, that means stores the values for each report date.

So basically I want to append the values for each report date in a history table. The problem is that if you want to run the macro again on the same day and check your values, it will only keep appending data instead of changing it for that report date.

So the solution for that is an delete query that deletes the data from only the reportdate thats about to be appended.

What I want is how I can set that up in the delete query to only delete the data from the certain reportdate that is about to be appended!
 
However this problem was larger in my head than in reality...

I just put a where [ReportDate]=Date() and it deletes properly..
Sorry for taking your time!
 
Your delete query criteria for deleteing a record with today's daye would be something like:
WHERE Reportate = Date()

Otherwise if it is not today you would need it to read the date of the report that is about to be calculated from the same place where the report reads it.

BTW Is your report so slow to calculate that you need to store these calculated values?
 
The universal exception to all rules and conventions: "The boss says so.";)
 

Users who are viewing this thread

Back
Top Bottom