Alpha Video Training
Results 1 to 15 of 15

Thread: Radio Buttons

  1. #1
    Jeff, Richards
    Guest

    Default Radio Buttons

    I have a set of 3 Radio buttons for choices on a form.
    How do I get the form to open up with a default choice already checked?
    My choices are fax, print and email.
    I want the form to always to default to the fax choice.
    Thanks.'

  2. #2
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default RE: Radio Buttons

    Jeff,

    Check out page 364/5 Xbasic Ref. Manual.

    Keith Hubert
    Guild Member
    London.

  3. #3
    Jeff, Richards
    Guest

    Default RE: Radio Buttons

    The Radio buttons are part of a form.
    Where would I establish a default button.

  4. #4
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default RE: Radio Buttons

    Jeff,

    What do you mean "The Radio buttons are part of a form" ?

    The Radio button is a field to give the user a set choice.

    Keith Hubert
    Guild Member
    London.

  5. #5
    Member
    Real Name
    John Hertzler
    Join Date
    Oct 2000
    Location
    Akron, PA
    Posts
    218

    Default RE: Radio Buttons

    In field rules
    Tab Data Entry
    Default Mode - Simple default expression
    Default Value - "Your Intended Value"
    Set value @start of data entry

  6. #6
    Jeff, Richards
    Guest

    Default RE: Radio Buttons

    The checkboxes were placed on the form by the drop down toolbox.I chose the Radio button object.The choices for the radio buttons were defined in the choices section. However, there is no setting for default choice.

  7. #7
    Jeff, Richards
    Guest

    Default RE: Radio Buttons

    Also- the radio buttons are based on a variable.
    It is not a field in the table that the form is based on.

  8. #8
    Jeff, Richards
    Guest

    Default RE: Radio Buttons

    The Radio buttons are not part of a table.
    There are no feild rules.
    I used the tool drop down menu to create it.

  9. #9
    "Certified" Alphaholic
    Real Name
    William Hanigsberg
    Join Date
    Apr 2000
    Location
    Toronto, ON
    Posts
    4,018

    Default RE: Radio Buttons

    It's the same concept using a variable. You set a "default" value of the variable.

    Variablename="default_value"

    Try attaching the code to the canEnterRecord event in field rules.

    Bill

  10. #10
    Jeff, Richards
    Guest

    Default RE: Radio Buttons

    I'm sorry, I don't think I'm explaining myself correctly.
    Here's the step by step.
    Open Form in Design Mode
    From the drop down toolbox I choose radio buttons and place it on the form
    It now asks for field select. I choose add variable.
    The add varaible box pops up. I define the variable as Scope: Layout Type Character. I leave value blank.
    I now click on the object on the form and go to properties.
    The field is Var->Print and the field type is RAdio Button.
    I now go to choices. I type in the choices fax print and email.
    Everything works fine. Except I want the form to open up and have the first radio button chosen on start up.
    Thanks in advance for the help.

  11. #11
    Jeff, Richards
    Guest

    Default RE: Radio Buttons

    I'm sorry, I don't think I'm explaining myself correctly.
    Here's the step by step.
    Open Form in Design Mode
    From the drop down toolbox I choose radio buttons and place it on the form
    It now asks for field select. I choose add variable.
    The add varaible box pops up. I define the variable as Scope: Layout Type Character. I leave value blank.
    I now click on the object on the form and go to properties.
    The field is Var->Print and the field type is RAdio Button.
    I now go to choices. I type in the choices fax print and email.
    Everything works fine. Except I want the form to open up and have the first radio button chosen on start up.
    Thanks in advance for the help.

  12. #12
    "Certified" Alphaholic
    Real Name
    William Hanigsberg
    Join Date
    Apr 2000
    Location
    Toronto, ON
    Posts
    4,018

    Default RE: Radio Buttons

    "The add varaible box pops up. I define the variable as Scope: Layout Type Character. I leave value blank"

    Don't leave it blank. Set it to the value you want as the default--the first button's value.

    Bill

  13. #13
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,635

    Default RE: Radio Buttons

    Jeff,

    When you create the variable, create is as "shared". Then, on the OnInit event for the form, put

    dim shared vprint as C (or whatever the vaiable name is)
    vprint="print" (or whatever your choice is)
    parentform:radio1.refresh()
    end

    Pat

  14. #14
    Jeff, Richards
    Guest

    Default RE: Radio Buttons

    What would I call the default first button?
    "faxed"

  15. #15
    "Certified" Alphaholic
    Real Name
    William Hanigsberg
    Join Date
    Apr 2000
    Location
    Toronto, ON
    Posts
    4,018

    Default RE: Radio Buttons

    Use the exact same spelling (and case) as the choice in the button setup. I just verified that this works fine.

    My apologies for sending you off at a slight angle. I thought you were saying that the setup screen let you input a default value for the variable which I now see is not the case.

    So Pat and I are both saying the same thing:
    -define the radion button based on a variable which you can add in the setup screen for the button;
    -attach code to a form event to instantiate a default value for the variable.

    Bill

Similar Threads

  1. Multistate & Radio Buttons
    By Tom Cone Jr in forum Code Archive
    Replies: 1
    Last Post: 05-16-2005, 03:18 PM
  2. radio buttons redux
    By Chuck Lafean in forum Alpha Five Version 6
    Replies: 1
    Last Post: 12-13-2004, 04:18 PM
  3. radio buttons
    By dik_coleman in forum Alpha Five Version 6
    Replies: 15
    Last Post: 12-12-2004, 05:40 PM
  4. Radio Buttons
    By Bruce Roberson in forum Alpha Five Version 4
    Replies: 1
    Last Post: 01-30-2003, 03:17 AM
  5. Radio Buttons
    By TerriH in forum Alpha Five Version 4
    Replies: 5
    Last Post: 09-21-2001, 05:12 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
  •