Normal Topic Visibility on Subform question (Read 612 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Visibility on Subform question
Dec 5th, 2007 at 8:45pm
Print Post Print Post  
Is there a command for setting an element as not visible when used on a subform? Or has my imagination got me once again. (So many great ones to remember and I could not find it in the manual)

I use this now but it has its issues so I thought if there was a command I should start using it

If @StandAlone() = 0 Then
{
     //Running as a subform

     Visibility(CusID, 0)
     Visibility(D, 0)
     Visibility(I, 0)

Thanks
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Visibility on Subform question
Reply #1 - Dec 5th, 2007 at 10:00pm
Print Post Print Post  
Hello Robert,

What problems are you having with that code? That is the way that you would set it.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Visibility on Subform question
Reply #2 - Dec 5th, 2007 at 10:29pm
Print Post Print Post  
Ray,

When I use the code as described above the elements are actually visible until focus is given to the subform, then they vanish.

Actually I have had better results adding command buttons to my form (as you know they do not show on the subform) I then use sbasic to set the label to the value of an  element I have permanently non visible. This allows me to see the data in the database when in it directly but hides it on the subform.

But in all reality I usually crash Sesame when I use either of these techniques because I usually end up trying to fill the hidden element on the subform and that is a no no with sesame.

An example of what I was trying to do is capture the CUSID onto a line Item line in the subform. This is helpful to have so a user can easily run a query (from the line items database) and see all the items a customer purchased over any length of time. It works well but looks ugly on the line item subform on the invoice, and also the extra elements like CUSID, date and invoice number waste valuable space on the screen.

I guess I just imagined a method of making a regular element act invisible to the subform.

Thanks

Robert   
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Visibility on Subform question
Reply #3 - Dec 6th, 2007 at 12:19am
Print Post Print Post  
Robert,

I do this all the time. Setting the value of a non-visible element on the subform should not be an issue.

I make the elements invisible by default. Then, I make them visible (if needed) if standalone.

If you are having issues doing this, get with Support. This is a common requirement and you should be able to do it without crashing or getting tricky about it.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Visibility on Subform question
Reply #4 - Dec 6th, 2007 at 12:42am
Print Post Print Post  
Thanks,

I will speak with tech support.
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Visibility on Subform question
Reply #5 - Dec 6th, 2007 at 4:03pm
Print Post Print Post  
Hello Robert,

BOBSCOTT wrote on Dec 5th, 2007 at 10:29pm:
When I use the code as described above the elements are actually visible until focus is given to the subform, then they vanish.


What you'll want to do is move your code from the On Form Entry Event to the Global Code event of the Subform. This not only will give you the desired effect but it will also be less code that runs as you move from record to record.

Quote:
But in all reality I usually crash Sesame when I use either of these techniques because I usually end up trying to fill the hidden element on the subform and that is a no no with sesame.


Do you have a sample of this that you can send in so that we can try to replicate it here and see what is happening? You know the e-mail address, send it in and I'll look at it as soon as I can.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged