CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 CC master/detail: conditional display of detail fo

Print topic Send  topic

Author Message
Gianni
Posted: 10/18/2002, 2:31 AM

Hi,

How can I hide a detail form when inserting a record in a master form?

The problem is: I cannot add child records if I haven't completed parent record insertion. If child form grid appears when I'm inserting the parent record, user can get confused.

I would like the child grid form be displayed only in update mode of the parent form.

Thank you for your help.
Gianni
Andrew B
Posted: 10/18/2002, 10:34 AM

This is how you can do it

1. Declare a variable in the 'open' event for the entire page. This will let you use it anywhere (i.e. on both forms).

dim m_HideDetail

2. In the 'open' event of your master form, insert this code :
if (bPK = false) then
m_HideDetail = true
else
m_HideDetail = false
end if

3. In the 'open' event of the form you want to hide, put this code :
if (m_HideDetail = true) then
SetVar "FormMyFormName", ""
exit sub
end if

That should do it, at least it does it for me :)
end if
Andrew B
Posted: 10/18/2002, 10:37 AM

Well, you didn't say it but the title of your post says 'CC' so I assumed CodeCharge. If you are using CodeCharge studio this will not work.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.