>Has any seen this behaviour?
>The problem occurs only on user's machine not on my development machine. I'm using (still?) VB5. We are all on NT. There are two command buttons on the form, one is for previewing the current record the other for printing it. There should always be only one page printed (the current record). The print button works fine but if the user clicks the preview button and then clicks the print icon in the preview it cycles thru the entire table not just the current record.
>
>
>My original code was:
>KEYBOARD '{CTRL+F10}'
>REPORT FORM hf_let2 PREVIEW NEXT 1
>
>I then changed it to:
>KEYBOARD '{CTRL+F10}'
>REPORT FORM hf_let2 PREVIEW FOR id_complaint = lcComplaintId
>
>Both behave the same way. Any help would be appreciated.
The problem is that the filter condition specified in a REPORT FORM command only gets applied the first time through the report - so if you preview it, the filter "disappears" and the whole file is printed. The best solution I've found is to use a cursor with just the filered scope of records as the record source rather than the table; IOW, filter the records and then print/view the filtered set, rather than applying the filter to the REPORT FORM line.