garyj
09-05-2014, 07:46 AM
I am not new to Access or VBA, but this one has me boggled :S
I have Access 2010, and I haven't done much VBA for creating reports. I think it would be better if there was a way to do this one without VBA.
I work for a nonprofit Summer Camp and we have a little shop in which parents prepay a credit to the shop and what is not used is returned to parents at the end of the week.
I have three tables that will be involved. Possibly only two are needed for this report.
CampKids is the table for fields: [KidsID], [Fname], [Lname], [CmpID], [CabinID]
Sales is the table for purchases: [SaleID], [KidsID], [ItemID], [Price], [SaleDate], etc
Orders is the table for orders purchased but cannot be received until the last day of camp: [OrderID], [KidsID], [SaleID], [ItemID], [Received]
I used to have a field in CampKids called ... and on each sale this amount would be adjusted. But errors tended to compound and an incorrect value is never corrected. So I removed that field, and opted for calculating the Balance each time the account is opened. It is much more accurate. I also removed fields [TshirtRecd], [DVDRecd], and [JournalRecd] and started up the Orders table making a subform with that information on the main account form.
[B]What I am trying to do now...
I had a report that worked off the old system, which summarized all the credits owed to campers in a particular camp - ie. Balance totals.
This report also summarized the total count of Tshirts, DVDs, and Journals that were still not [Received].
Additional problem: If a camper orders 2 DVDs, then two records are made in table Orders, each with [Received] = false.
I want a report that says: Camper Name / Balance Owed / Tshirts Count / DVDs Count / Journals Count (count being those not received)
The summary value would then give the Sum of Balance Owed, and the Total Count of the other 3 items.
I am thinking the only way to do this is write code for getting all the records during one of the events after the report is opened.
I would opt to add [Balance] back into CampKids, and to save the value calculated each time an account is closed. This would keep it accurate. I think the other values could still come from Orders... but I am not sure how.
Thanks for trying to understand my problem. Please let me know if I need to provide further info. Also, I don't need the whole code... just a start, if you follow my meaning. :)
Gary
I have Access 2010, and I haven't done much VBA for creating reports. I think it would be better if there was a way to do this one without VBA.
I work for a nonprofit Summer Camp and we have a little shop in which parents prepay a credit to the shop and what is not used is returned to parents at the end of the week.
I have three tables that will be involved. Possibly only two are needed for this report.
CampKids is the table for fields: [KidsID], [Fname], [Lname], [CmpID], [CabinID]
Sales is the table for purchases: [SaleID], [KidsID], [ItemID], [Price], [SaleDate], etc
Orders is the table for orders purchased but cannot be received until the last day of camp: [OrderID], [KidsID], [SaleID], [ItemID], [Received]
I used to have a field in CampKids called ... and on each sale this amount would be adjusted. But errors tended to compound and an incorrect value is never corrected. So I removed that field, and opted for calculating the Balance each time the account is opened. It is much more accurate. I also removed fields [TshirtRecd], [DVDRecd], and [JournalRecd] and started up the Orders table making a subform with that information on the main account form.
[B]What I am trying to do now...
I had a report that worked off the old system, which summarized all the credits owed to campers in a particular camp - ie. Balance totals.
This report also summarized the total count of Tshirts, DVDs, and Journals that were still not [Received].
Additional problem: If a camper orders 2 DVDs, then two records are made in table Orders, each with [Received] = false.
I want a report that says: Camper Name / Balance Owed / Tshirts Count / DVDs Count / Journals Count (count being those not received)
The summary value would then give the Sum of Balance Owed, and the Total Count of the other 3 items.
I am thinking the only way to do this is write code for getting all the records during one of the events after the report is opened.
I would opt to add [Balance] back into CampKids, and to save the value calculated each time an account is closed. This would keep it accurate. I think the other values could still come from Orders... but I am not sure how.
Thanks for trying to understand my problem. Please let me know if I need to provide further info. Also, I don't need the whole code... just a start, if you follow my meaning. :)
Gary