Alpha Video Training
Results 1 to 5 of 5

Thread: checkbox in tabbed subform

  1. #1
    Alan Henson
    Guest

    Default checkbox in tabbed subform

    I have a check box which I want to use to set values in the fields on one tab of a tabbed form when checked & clear them when unchecked.

    It works perfectly when the form stands alone but when I use it as a subform I get the message:

    Script:OnChange line:11
    topparent:Bb.value="bb"
    topparent:Bb not found

    Where Bb is the field & "bb" the value I want to enter.

    I'm using the Actionscript Genie to create the script.

    I am new to Alpha 5 & Xbasic so struggle with the code. I tried using Xbasic code & changing topparent to parent but no better.

    Any suggestions?

  2. #2
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,306

    Default RE: checkbox in tabbed subform

    the problem you are running into is that when the form is a subform, then the address of the controls is no longer this:

    topparent:Bb.value="bb"
    topparent:Bb not found

    if the subform object name is 'form1' for example, then the address of a control on a subform is:

    topparent:form1:Bb

    so the command is

    topparent:form1:Bb.value = "bb"

  3. #3
    Alan Henson
    Guest

    Default RE: checkbox in tabbed subform

    Hi Selwyn

    Thanks for the reply, however I'm still getting an equivalent message.

    My subform object is 'subform2', at least I think it is! That is the what appears in the comment for the script:

    'Set 'Value' property of multiple objects in Form 'subform2'
    topparent:subform2:Bb.value = "bb"
    etc

    It is also shown as subform2 in the header bar of the Code Editor.

    So the current error message says:

    topparent:subform2:Bb not found

    Am I missing something?
    Alan

  4. #4
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,306

    Default RE: checkbox in tabbed subform

    if you open your form. then go to view/object explorer.
    find the object you want to address in the object explorer. then click the 'copy to clipboard' button.

    it will tell you what the object's address is.

  5. #5
    Alan Henson
    Guest

    Default RE: checkbox in tabbed subform

    Thanks Selwyn, that's sorted now.

    The object explorer is certainly a powerful tool & the help available on relative & explicit names was appreciated.

Similar Threads

  1. Tabbed Subform & Browse
    By ChrisHawkes in forum Alpha Five Version 5
    Replies: 5
    Last Post: 05-02-2005, 10:07 AM
  2. Tabbed Subform
    By Tom Henkel in forum Alpha Five Version 5
    Replies: 3
    Last Post: 09-14-2004, 07:37 AM
  3. Printing a tabbed subform
    By Bill Maguire in forum Alpha Five Version 5
    Replies: 8
    Last Post: 08-20-2003, 06:25 PM
  4. Tabbed Subform
    By Mortie in forum Alpha Five Version 5
    Replies: 5
    Last Post: 03-30-2003, 08:49 AM
  5. Frozen tabbed subform
    By Greg Fong in forum Alpha Five Version 4
    Replies: 2
    Last Post: 06-26-2001, 10:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •