Normal Topic Visibility function causes a fail to compile (Read 1423 times)
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Visibility function causes a fail to compile
Mar 23rd, 2004 at 7:13pm
Print Post Print Post  
I am using v.10.2 and the Visibility function causes compilation errors, eventho Test Program generates no error. The name of the LE is correct in the function call.  Any clues?

Thanx
  
Back to top
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: Visibility function causes a fail to compile
Reply #1 - Mar 23rd, 2004 at 7:17pm
Print Post Print Post  
sorry. should have read the Change Log first.
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Visibility function causes a fail to compile
Reply #2 - Mar 23rd, 2004 at 7:18pm
Print Post Print Post  
If you have an LE that is not completely on the Form (ghosted), Test program will be okay, but Preview or Runtime will show compile errors because the LE isn't really there. Make sure your element is on the Form, not on the Canvas.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: Visibility function causes a fail to compile
Reply #3 - Mar 23rd, 2004 at 8:26pm
Print Post Print Post  
the subform is on a tab page which completely fits on the form. I also used the SubformVisibility command and it also gives me a compilation error.

The value of State in the command is still 0 or 1 i assume?
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Visibility function causes a fail to compile
Reply #4 - Mar 23rd, 2004 at 8:28pm
Print Post Print Post  
The Visibility command will not accept a Subform element. If you are using the new SubformVisibility command, post your line of code and I'll see if I can spot the problem.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: Visibility function causes a fail to compile
Reply #5 - Mar 23rd, 2004 at 8:51pm
Print Post Print Post  
the code is:

if @Add then
{      
   SubformVisibility(Children_SFF,1)
   SubformVisibility(Children_SFT,0)
}

The premise it is that I want the subform to appear as a form if the user is in Add mode, otherwise it should appear as a table.

Thanx.
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Visibility function causes a fail to compile
Reply #6 - Mar 23rd, 2004 at 8:55pm
Print Post Print Post  
SubformVisibility takes the LE name of the subform element as a string.

SubformVisibility("Children_SFF", 1)

Note that the name needs to be the name of the Subform LE on the parent form, NOT the name of the Form it displays.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: Visibility function causes a fail to compile
Reply #7 - Mar 23rd, 2004 at 9:06pm
Print Post Print Post  
does that mean that the parameter for the LE in the Visibility function call is also supposed to be enclosed in quotes? b/c in the Programming guide, the example is: Visibility(Company,0)

  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Visibility function causes a fail to compile
Reply #8 - Mar 23rd, 2004 at 9:17pm
Print Post Print Post  
Quote:
does that mean that the parameter for the LE in the Visibility function call is also supposed to be enclosed in quotes? b/c in the Programming guide, the example is: Visibility(Company,0)


No. The documentation for Visibility is correct. Subforms must be handled differently than other types of elements.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged