Multiple Reports

G

Guest

In Access 2000-2003 I have built the tables and an input form, and now there
are approximately 13 reports they want to generate from this data. I know I
can set up access to them on a switchboard , but is there any other way that
may be more efficient to allow access to these reports? In addition, I will
have to set up some sort of a ?query? for the user to input the range
(usually date) to determine the data to incorporate into the reports. I'm
really not too familiar with reports and I feel like I'm in over my head on
this one!! Any help will be greatly appreciated!

Owl Lover
 
G

Guest

I generally create a table of reports with the object name, a user-friendly
title, status, etc. I use this table as the Row Source for a list box
(lboReport) on a form. This allows the user to select a report. I bind the
list box to the object name but display the title.

I add additional controls to the form containing the list box for the user
to select/enter criteria. For instance, you might have text boxes named
txtStart and txtEnd. Your code in the On Click of a command button might be
something like:

Dim strWhere as String
Dim strReport as String
If IsNull(Me.lboReport) Then
Msgbox "Pick a report", acOkOnly, "PEBKAC"
Exit Sub
Else
strReport = Me.lboReport
End If
strWhere = "1=1 "
If Not IsNull(Me.txtStart) Then
strWhere = strWhere & " And [DateField]>=#" & _
Me.txtStart & "# "
End If
If Not IsNull(Me.txtEnd) Then
strWhere = strWhere & " And [DateField]<=#" & _
Me.txtEnd & "# "
End If
DoCMd.OpenReport strReport, acPreview, , strWhere
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top