PDA

Click to See Complete Forum and Search --> : Select user criteria


Manny Somarriba
Oct 28th, 2003, 07:53 AM
I want to prints only selected records from a user criteria before print the report. I have a table with some orders that I would like to print from selected dates for example the orders from today or the orders from last month.

Question how can I enter an input to select these records?


Thanks & Regards

JefB
Nov 3rd, 2003, 11:36 PM
If you are using Access, there is two methods.

One method would be to use a filter on the report, on the OnOpen event of the report, you change the filter property using the datas entered on a form, for example:

Private Sub Report_Open(Cancel As Integer)
Me.Filter = "TheDate = " & [Forms]![frmdate]![USERDATE]
End Sub

You could also specify the [Forms]![frmdate]![USERDATE] directly into a query, each time you run the query, you only need to have the form loaded for the query to work. Both method require the form to be open to work and the textbox filled.

JeffB