 | 
28-Oct-2005, 18:00 PM
|  | Guest | | | | | | | | | | Hide Fields on Reports based upon criteria This should be a very simple thing to do, but I'm running into the all famous Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/6008-hide-fields-reports-based-upon-criteria.html
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 Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6008
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! * Do you agree or disagree with the writer above? Why not share your immediate thoughts with us! Login Now! or Sign Up Today! to share your views... Gurfateh! | 
28-Oct-2005, 18:00 PM
|  | Guest | | | | | | | | | | RE: Hide Fields on Reports based upon criteria Did you put this code on the On format event of the section where both fields Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6008
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 Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6008
> 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!
> | 
28-Oct-2005, 18:00 PM
|  | Guest | | | | | | | | | | RE: Hide Fields on Reports based upon criteria Well, we're getting a little closer. Now I don't get the error. BUT now the Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6008
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)
If [Proposal?] = -1 Then Me.Admin_Stamp.Visible = False
End Sub
"Ofer" wrote:
> 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. Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6008
>
> 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!
> > | 
28-Oct-2005, 18:00 PM
|  | Guest | | | | | | | | | | 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 Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6008
> code.
>
> Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
> If [Proposal?] = -1 Then Me.Admin_Stamp.Visible = False
> End Sub
>
> "Ofer" wrote:
>
> > 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. Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6008
> > > Help!
> > > | 
28-Oct-2005, 18:00 PM
|  | Guest | | | | | | | | | | RE: Hide Fields on Reports based upon criteria You're a genious!!! Thank you very much. It works. Just can't leave out
both sides of the "else".
"Ofer" wrote:
> 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)
> > If [Proposal?] = -1 Then Me.Admin_Stamp.Visible = False
> > End Sub
> >
> > "Ofer" wrote:
> >
> > > 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 Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6008
> > > > 2427 error code. I want to hide a field if a checkbox is checked. So here Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6008
> > > > 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!
> > > > | 
Support Us! Become a Promoter! | | Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh! | (View-All)
Members who have read this thread : 0
| | There are no names to display. | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Tools | Search | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Active Discussions | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | » Books You Should Read... | | | |