Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21246

[RESOLVED] Help me with this please

$
0
0
Hi :)

How are you all ? Well, I'm new ere as I was facing a problem that could be an easy one to so many of you . I am working with VB6 and designing my reports using Crystal report 4.6 . I have set my sql statement ready to search between 2 dates . now I want to add another criteria to the same statement which is I have a field called "Carrier" in the same table "Exp" so the records that i want to show in the report are the ones that have a carrier which is given in a textbox but still its between the 2 dates . this is my code .


'''''''''''''''''''''''''''''''''''''''''''''''
On Error Resume Next
Dim j
Dim counterx
Dim i As Integer
j = GetSetting("Shipping", "1", "Path")
For i = 1 To Len(j)
counterx = Mid(Right(j, i), 1, 1)
If counterx = "\" Then
counterx = Mid(j, 1, Len(j) - i) & "\expetd.rpt"
CrystalReport1.ReportFileName = counterx
CrystalReport1.SelectionFormula = "{Exp.ETD} In Date(" & Format(Text1.Text, "yyyy,mm,dd") & ") To Date(" & Format(Text2.Text, "yyyy,mm,dd") & ")"
CrystalReport1.Action = 1
Exit Sub
End If
Next
'''''''''''''''''''''''''''''''''''''''''''''''

Viewing all articles
Browse latest Browse all 21246

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>