Hi I am trying to get the info for sales from last week (ending on Saturday and new week starting Sunday) and this week starting on Sunday case 4 and 5.
For some reason I can easily go back 7 days from today but not last week that ends Saturday
I am really struggling with this
Heres what I have I have tried all over to get an answer but to no avail
Private Sub grpChoice_AfterUpdate()
Dim dDate As Date
Select Case grpChoice.Value
Case 1: dDate = "15/02/2011"
Case 2: dDate = "1/1/" & Year(Date)
Case 3: dDate = Month(Date) & "/1/" & Year(Date)
Case 4:
Case 5:
End Select
Me.LastWeekSalesSub.Form.Filter = "[OrderDate]>=#" & dDate & "#"
Me.LastWeekSalesSub.Form.FilterOn = True
If dDate = "15/02/2011" Then
Me.LastWeekSalesSub.Form.FilterOn = False
End If
End Sub
Thanks for your guidance
For some reason I can easily go back 7 days from today but not last week that ends Saturday
I am really struggling with this
Heres what I have I have tried all over to get an answer but to no avail
Private Sub grpChoice_AfterUpdate()
Dim dDate As Date
Select Case grpChoice.Value
Case 1: dDate = "15/02/2011"
Case 2: dDate = "1/1/" & Year(Date)
Case 3: dDate = Month(Date) & "/1/" & Year(Date)
Case 4:
Case 5:
End Select
Me.LastWeekSalesSub.Form.Filter = "[OrderDate]>=#" & dDate & "#"
Me.LastWeekSalesSub.Form.FilterOn = True
If dDate = "15/02/2011" Then
Me.LastWeekSalesSub.Form.FilterOn = False
End If
End Sub
Thanks for your guidance