query4u
July 12th, 2006, 05:39 AM
hi,
i have designed one report. i want to display records ,for that i will specify the range like prodno between 1 to 100 then it will print the record from 1 to 100. if i specify 10 to 20 then it will print 10 to 20.
in selection formula i have written following code
with cr1
.Connect = strr1
form1 = "{product_tab.prod_id}>" & txtfrom & " and {product_tab.prod_id}<=" & txtto
.SQLQuery = "select * from product_tab"
.SelectionFormula = form1
.WindowShowPrintBtn = True
.WindowState = crptMaximized
.Action = 1
end with
in txtfrom i m specifying lower limit & txtto upper limit.
but it is not displaying records. can anyone tell me what i ve to write in seletion formula.
i have designed one report. i want to display records ,for that i will specify the range like prodno between 1 to 100 then it will print the record from 1 to 100. if i specify 10 to 20 then it will print 10 to 20.
in selection formula i have written following code
with cr1
.Connect = strr1
form1 = "{product_tab.prod_id}>" & txtfrom & " and {product_tab.prod_id}<=" & txtto
.SQLQuery = "select * from product_tab"
.SelectionFormula = form1
.WindowShowPrintBtn = True
.WindowState = crptMaximized
.Action = 1
end with
in txtfrom i m specifying lower limit & txtto upper limit.
but it is not displaying records. can anyone tell me what i ve to write in seletion formula.