M
Mr-Re Man
I have used some code from this discussion group to filter a report. The
form I have created has two fields, 1 unbound combo box (cboTeams) and 1
unbound text box (txtDate).
I need users to be able to select the team from the dropdown, input a date
and then click the button 'Create Report' and it displays the filtered data
only.
So far, I have only been able to find code that relates to a combo box.
I would be gratefule if somebody would be able to spare a few minutes to
provide me with the necessary code to complete my filter.
I also need the code to display a message if the txtDate field is left blank
as the database holds about 20,000 records. By selecting an individual day
filters out about 100 records.
Also, I would like to preview it on screen prior to it printing out
automatically like it does at the moment.
My code so far is as follws:
Private Sub cmdCreateReport_Click()
DoCmd.OpenReport "repSectionsMailSummary", , , "[Team] = '" &
Me.cboTeams & "'"
End Sub
tia
form I have created has two fields, 1 unbound combo box (cboTeams) and 1
unbound text box (txtDate).
I need users to be able to select the team from the dropdown, input a date
and then click the button 'Create Report' and it displays the filtered data
only.
So far, I have only been able to find code that relates to a combo box.
I would be gratefule if somebody would be able to spare a few minutes to
provide me with the necessary code to complete my filter.
I also need the code to display a message if the txtDate field is left blank
as the database holds about 20,000 records. By selecting an individual day
filters out about 100 records.
Also, I would like to preview it on screen prior to it printing out
automatically like it does at the moment.
My code so far is as follws:
Private Sub cmdCreateReport_Click()
DoCmd.OpenReport "repSectionsMailSummary", , , "[Team] = '" &
Me.cboTeams & "'"
End Sub
tia