>I have designed "print.scx", in that i have put one command button namely "cmdprint" and one text boxex namely "txtpageno". in cmdprint i have written code for printing records. for some times i I want to print particular page of my report for example i want to print 4th page of my report means I have entered 4 in txtpageno and click command button the 4th page of my report will print or i want to print 4th and 5th pages of my report means I have entered 4, 5 in txtpageno and click command button the 4th and 5th pages of my report will print.
>
>How to write code?
Given that thisform.txtpageno.value is text
lnStartpage=val(getwordnum(thisform.txtpageno.value,1,',')
lnEndpage=val(getwordnum(thisform.txtpageno.value,2,',')
if lnStartpage=0
lnStartpage=1
endif
if lnEndpage=0
lnEndpage=10000
endif
Report form ...... Range lnStartpage, lnEndpage