Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide Values

Status
Not open for further replies.

Grumm

Technical User
Sep 27, 2002
68
0
0
AU
Hi, is it possible to hide values on a repory depending on a value entered by user. If they click to generate a repoty they will be prompted with a question 'Include Amount Y/N'. If they type N the report will be produced with the Amount hidden. I can do it on forms but cant see a way on reports.

Cheers
 
Use code in the On Open event that sets a value

Option Compare Database
Option Explicit
Dim booPrintAmt As Boolean

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.txtAmt.Visible = booPrintAmt
End Sub

Private Sub Report_Open(Cancel As Integer)
booPrintAmt = MsgBox("Print Amt", vbYesNo, "You Pick") = vbYes
End Sub


Duane
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top