C
Charlie O'Neill
I have customer accounts that expire on various dates. Once a month a
mailing list must be printed. On a form I am using a control which is
formatted as a date picker. When a clerk enters a date in the control any
accounts => than the date will print. The problem is if the clerk enters a
date of 5/12/2010 any account dated between 5/1 and 5/11 does not print.
I want to change the control to a drop down showing Jan, Feb, Mar etc. When
the clerk picks May I want a hidden control 'Mail' to show 5/1/2010 and use
this control for my query.
I tried
If Me.Combo35.Value = "April" Then
Me.Mail.Value = #04/01/2010#
End If
If Me.Combo35.Value = "May" Then
Me.Mail.Value = #05/01/2010#
End If
If Me.Combo35.Value = "June" Then
Me.Mail.Value = #05/01/2010#
End If
End Sub
But of course when 2011 arrives I need to change the code to 2011.
I tried using the following
I created another hidden control named 'Year' with the following in the
control properties
=Right(Date(),4)
Private Sub Combo35_AfterUpdate()
If Me.Combo35.Value = "April" Then
Me.Mail.Value = "4/1/" & Me.Year.Value
End If
If Me.Combo35.Value = "May" Then
Me.Mail.Value = "5/1/" & Me.Year.Value
End If
If Me.Combo35.Value = "June" Then
Me.Mail.Value = "6/1/" & Me.Year.Value
End If
End Sub
Although it appears that the correct date is entered in the me.Mail control
I cannot print accounts with dates greater than 2010. 2011 accounts do not
print.
Charlie
mailing list must be printed. On a form I am using a control which is
formatted as a date picker. When a clerk enters a date in the control any
accounts => than the date will print. The problem is if the clerk enters a
date of 5/12/2010 any account dated between 5/1 and 5/11 does not print.
I want to change the control to a drop down showing Jan, Feb, Mar etc. When
the clerk picks May I want a hidden control 'Mail' to show 5/1/2010 and use
this control for my query.
I tried
If Me.Combo35.Value = "April" Then
Me.Mail.Value = #04/01/2010#
End If
If Me.Combo35.Value = "May" Then
Me.Mail.Value = #05/01/2010#
End If
If Me.Combo35.Value = "June" Then
Me.Mail.Value = #05/01/2010#
End If
End Sub
But of course when 2011 arrives I need to change the code to 2011.
I tried using the following
I created another hidden control named 'Year' with the following in the
control properties
=Right(Date(),4)
Private Sub Combo35_AfterUpdate()
If Me.Combo35.Value = "April" Then
Me.Mail.Value = "4/1/" & Me.Year.Value
End If
If Me.Combo35.Value = "May" Then
Me.Mail.Value = "5/1/" & Me.Year.Value
End If
If Me.Combo35.Value = "June" Then
Me.Mail.Value = "6/1/" & Me.Year.Value
End If
End Sub
Although it appears that the correct date is entered in the me.Mail control
I cannot print accounts with dates greater than 2010. 2011 accounts do not
print.
Charlie