create a custom report

A

anu

Hi

I have MS Access 2003. I am trying to create a tabular report which
shows data from a single table.

There is a form which contains
search box (for employee name)
check box for salary
check box for SSN
check box for position.
Button , which when hit opens a report


If all the check boxes are not selected then the report just prints
basic information - employee name and emplid.
But if check box for salary is selected then it shows basic
information and salary. Same for other check boxes.

Please help in creating this check box logic.

Thx
anu
 
A

Al Campagna

anu,
There are several ways to do that.
On your report, in the report section where your data exists
(I'll assume the DetailSection), use the section's OnFormat event
to code as follows...

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Forms!YourFormName!YourSalaryCheck = False Then
Me.SalaryField.Visible = False
Elseif Forms!YourFormName!YourSalaryCheck = True
Me.SalaryField.Visible = True
End Sub
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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