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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

invisible problem 1

Status
Not open for further replies.

Ryon

Technical User
Nov 1, 2002
64
0
0
US
I am trying to limit what is visible on a report (rptinvoice). I have a form with 3 checkboxes (check1,check3 and check5) the form is FRMPRINTSELECTION.
this is the code I was trying (dont laugh, I 'm new to this)

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
If Form!frmprintselection!Check1 = -1 Then
LABOR.Visible = True
Material.visible = true
else
****
End If
End Sub

I think if I can get pointed in the right direction I could complete the rest of it

Thanks again
 
Please explain some more about what you are trying to do. Are LABOR and Material fields in the Detail section or in the PageFooter section? What do the three checkboxes control?

I think you're on the right track, but I need some more information in order to give you a proper answer.
 
Everything I want to be visible or invisible is on the page footer section.I have 2 text boxes that I want to control. if CHECK1 on form FRMPRINTSELECTION is selected than I want the taxt boxes LABOR and MATERIAL to be invisible. If CHECK3 is selected than I want LABOR and MATERIAL to be visible.IF CHECK5 is selected than I want LABOR only to be visible.I access the report with a preview and print button on the form. Let me know if you need anything else

thanks

 
Mike Lawrence ( Programmer )

Put a Function as the data source in your report and pass the data that would normally be on the report as a parameter and then have the function return the data you want on the report or "" as the case may be.
This works fine for all sections.


 
I coding hope this helps
' I assume -1 is on lazy to check
'---------------------------------


Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)

me!LABOR.Visible = False ' default as invisible
me!Material.visible = False

If Form!frmprintselection!Check1 = -1 Then
me!LABOR.Visible = False
me!Material.visible = False
else
if Form!frmprintselection!Check3 = -1 then
me!LABOR.Visible = True
me!Material.visible = True
else
if Form!frmprintselection!Check5 = -1 then
me!LABOR.Visible = True
me!Material.visible = False
end if
end if
end if

End Sub
 
thanks sngsng, that worked!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top