Copy and Paste records with current date

AceBK

Registered User.
Local time
Today, 01:31
Joined
Dec 2, 2011
Messages
75
I have a database that is tracking donations for my organization. I have some members who donate the same amount every month. Is there away to copy the records and paste them with the current date in the "Date Paid" field, and do this "Update" once a month? As opposed to typing in 200 records each month? I would assume that I would have to run an update query which filters to just the members that pay each month, but the big question is how to copy and paste these records. I am using Access 2010, I have some VB ability, but not an expert by any stretch. My SQL is not strong at all either.

Thank you in advance for any advice I receive.
 
Lets say your transactions are in a table called tblTrans and with the following fields:
TranDate
TranType
TranDesc
TranAmount
MemberID

Your update query would be along the following lines:

Code:
INSERT INTO TblTrans( MemberID, TranDate, TranType, TranDesc, TranAmount )
SELECT MemberID, Date(), TranType, TranDesc, TranAmount
FROM TblTrans
WHERE TranType=1 AND Format([trandate],"yyyymm")=Format(DateAdd("m",-1,Date()),"yyyymm")

TranType will be something to identify transactions as DD and the query picks up all transactions of that type for last month. You will probably need to make some changes for your table structure, but the principle still stands
 
So I tried to type in your SQL code but when I put it to 'update' query it changed the SQL I put in and added an 'update' line. Also, it asked for a destination field? Is that the "id" field?
 
I wouldn't know since it is your code:) - the code I posted came directly from a query I use for something similar and I know works.

I have just realised I have been a bit loose with my description - instead of

Your update query would be along the following lines

I should have said

Your append query would be along the following lines

Suggest you post the sql you have got if you still have a problem.
 

Users who are viewing this thread

Back
Top Bottom