251c Sikh Philosophy Network - View Single Post - Hide Fields on Reports based upon criteria
View Single Post
  #4 (permalink)  
Old 28-Oct-2005, 18:00 PM
Ofer's Avatar Ofer
Guest
 
Posts: n/a
   
   
RE: Hide Fields on Reports based upon criteria

It becuase you never set it back to true, try this
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If [Proposal?] = -1 Then
Me.Admin_Stamp.Visible = False
else
Me.Admin_Stamp.Visible = True
End if
End Sub
=====================================
Or
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.Admin_Stamp.Visible = Not ([Proposal?] = -1)
End Sub


--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck



"bondtk" wrote:

> Well, we're getting a little closer. Now I don't get the error. BUT now the
> field is not visible regardless of the value of [Proposal?] Here's my exact
> code.
>
> Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/6008-hide-fields-reports-based-upon-criteria.html
> If [Proposal?] = -1 Then Me.Admin_Stamp.Visible = False
> End Sub
>
> "Ofer" wrote:
>
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6008
> > Did you put this code on the On format event of the section where both fields
> > are located in?
> > --
> > If I answered your question, please mark it as an answer. That way, it will
> > stay saved for a longer time, so other can benifit from it.
> >
> > Good luck
> >
> >
> >
> > "bondtk" wrote:
> >
> > > This should be a very simple thing to do, but I'm running into the all famous
> > > 2427 error code. I want to hide a field if a checkbox is checked. So here
> > > is my present code.
> > >
> > > Sub
> > > If [Proposal?]=-1 then Me.adminstamp.visible=false
> > > End Sub
> > >
> > > I put the [Proposal?] checkbox field on the report just in case that was the
> > > issue but still get the same error 2427 "You entered an expression that has
> > > no value"
> > >
> > > This type of code was easy to put on a form, but the report doesn't like it.
> > > Help!
> > >

Reply With Quote
 
Page generated in 0.17466 seconds with 25 queries
0