Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,
    I have a form which the client depresses a toggle button so a text box will appear. Once they enter the data, I open another form to show the records they have requested. When they leave the second form, we go back to the first form. The first form still shows the last toggle button that was depressed. I want to come back to a form without any toggle button showing as depressed. I tried to move FALSE to the toggle button value, but I get an error. Any way I can reset the toggle buttons?
    Thanks,
    Sarge

  2. #2
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts
    False ought to reset a toggle button unless it is inside an option group frame.
    What is the error message, and what line of code are you using to set the value.
    Also where is the code that generates the error.
    Andrew

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    I agree with Andrew. Setting the value of the toggle to false should work.
    It does for me, when I put
    Code:
    Me.Toggle97.Value = False
    in the On Activate event for the form.
    Regards
    John



  4. #4
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Andrew and John,
    Sorry I forget to add that the toggle buttons are inside a option Group Frame. What is the trick with it?
    Sarge

  5. #5
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Within the option group, each toggle will have a numerical value . The properties box will tell you the value of each, but they are probably start at 1 and go up.

    So in the OnActive event, set the value of the optionGroup back to 0.
    Regards
    John



  6. #6
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks a lot John,
    Sarge

Posting Permissions

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