hernandez0206
New member
- Local time
- Today, 06:26
- Joined
- Mar 14, 2013
- Messages
- 1
I need help with my project I need help with my queries update the MonthlyFee field by increasing it by 10% thank you.
SELECT DM.Class, DM.ClassName, DM.Size, DM.SizeName, DM.TDate, Sum(DM.BG) AS SumOfBG, Sum(DM.Demo) AS SumOfDemo, Sum(DM.DTP) AS SumOfDTP, Sum(DM.FAS) AS SumOfFAS, Sum(DM.FM) AS SumOfFM, Sum(DM.HPM) AS SumOfHPM, DM.Division
FROM DM
WHERE (((DM.TDate) Between [Forms]![FormForDates]![DateStart] And [Forms]![FormForDates]![DateEnd]))
GROUP BY DM.Class, DM.ClassName, DM.Size, DM.SizeName, DM.TDate, DM.Division
ORDER BY DM.ClassName, DM.TDate;
Dim DaysInMont As Integer
Dim CurYear As Integer
Dim CurMonth As Integer
Dim CurDay As Integer
'Start by taking the date apart.
CurYear = DatePart("yyyy", Me.EndDate)
'Use the previous month,
CurMonth = DatePart("m", Me.EndDate) - 1
'and set the Start day as the day AFTER the current one
CurDay = DatePart("d", Me.EndDate) + 1
'Make sure we know the maximum number of days in the previous month.
DaysInMonth = DatePart("d", DateSerial(DatePart("yyyy", Me.EndDate), DatePart("m", Me.EndDate), 0))
'If we would be using a date that doesn't exist, use the last day of the month.
If DaysInMonth < CurDay Then CurDay = DaysInMonth
'Once we have the pieces, set the start date.
Me.StartDate = DateSerial(CurYear, CurMonth, CurDay)
Me.StartDate = Me.EndDate -30