help me plz......URGENT

  • Thread starter Thread starter KRISH
  • Start date Start date
K

KRISH

Any body help me how to give a criteria from form text
field to generate report according to ID like

if I give in the text box in the form as >20 - report
should get the results wher ID is >20

if I give <20 then - report should get the results where
ID is <20

Thanks in advance
 
Any body help me how to give a criteria from form text
field to generate report according to ID like

if I give in the text box in the form as >20 - report
should get the results wher ID is >20

if I give <20 then - report should get the results where
ID is <20

Thanks in advance

Let's assume the control on the form is named 'ShowRecords'.

Add a command button to the form.
Code it's click event:
DoCmd.OpenReport "ReportName",acViewPreview, , "[ID] & Me!ShowRecords

If you enter < 20 in the control, only records with an ID less than 20
will print.
 
Back
Top