build own reports (1 Viewer)

legendv

Registered User.
Local time
Today, 06:17
Joined
Mar 18, 2002
Messages
99
I would like to give the user the option of what fields they want on a report. For instance if they wanted to print out a sales report they could choose, before printing, what fields they wanted...

DateSold
Salesperson
SalesRegion
ProductSold
SoldTo
Customer
CustomerAddress

If they wanted all, or just two of the fields that would print out.

Does anyone know about some examples that I could check out?
 

WayneRyan

AWF VIP
Local time
Today, 06:17
Joined
Nov 19, 2002
Messages
7,122
legend,

If the Form that they specify what fields to include is open then
on the Report's OnOpen Event:

If Forms![frmOption]![DateSold] = True Then
Me.txtDateSold.Visible = True
End If

Repeat for each field ...

Assumes the form's fields are checkboxes.

Wayne
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:17
Joined
Feb 19, 2002
Messages
43,266
Prepare to write/modify a serious amount of code. Look at the example of a CrossTab report in solutions.mdb. You should be able to adapt that to your purposes. If you don't have that sample, you can get an A2K version at this site:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/bapp2000/html/mdbdownload.asp

If you need an A97 version, it is on your Access installation CD, you can install it from there.
 

Users who are viewing this thread

Top Bottom