Between Clause In Crystal Report

ali shah

Member
Joined
Jan 13, 2005
Messages
10
Programming Experience
Beginner
hi i am hiving problems in using between statement in crystal report can any body help me here is my code

Private Sub DateTimePicker2_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker2.ValueChanged

With cv

.SelectionFormula = "{END_USERS_ORDER_DISPATCH.EU_Dispatch_DateTime_Sent} between '" &
Me.DateTimePicker1.Value & "' And '" & Me.DateTimePicker2.Value & "'"

.RefreshReport()

End With

End Sub

but it is giving error i don't know what is wrong with my select statement

thanks
 
hi,
try this code

PrivateSub DateTimePicker2_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker2.ValueChanged

With cv

.SelectionFormula = "{END_USERS_ORDER_DISPATCH.EU_Dispatch_DateTime_Sen t} in '" &
Me.DateTimePicker1.Value & "' to '" & Me.DateTimePicker2.Value & "'"

.RefreshReport()

EndWith

EndSub
 
Back
Top