Results 1 to 8 of 8
  1. #1
    P5C768 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2009
    Location
    Denver, CO
    Posts
    95

    Toggle Button on Bound Form

    Is there any way to make the result of a toggle button selection specific to the current record on a bound form? I am using one to display/hide a field and even using me.togglebutton1 seems to apply the selection to every record, rather than just to the current record.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The ToggleButton needs to be bound to a field in the RecordSource of the form for it to act independantly on each record.

  3. #3
    P5C768 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2009
    Location
    Denver, CO
    Posts
    95
    I have it bound to a field on a table. All the other fields on the tab control are boud to fields on the same table as well. However, the toggle button seems to activate all fields in the table i.e if you set the toggle to true, all the records in the table get set to true.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    For just this field? Do you have any code running on the Toggle Button? If so, can you post it?

  5. #5
    P5C768 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2009
    Location
    Denver, CO
    Posts
    95
    Yes, for tjust this field. The only code I currently have associated with this toggle button is this:

    Code:
     
    Private Sub TogSA1_AfterUpdate()
        If Me.TogSA1.Value = True Then
            Me.txtSA1.Visible = True
        Else
            Me.txtSA1.Visible = False
        End If
    End Sub
    Another question. I saw some of your posts regarding the trust center in 2007. I opened my db at home last night in 2003, made some minor changes to the formatting of a form, then opened it again in 2007 today. For some reason, none of my even procedures are working. I have tried creating new trusted locations, moving the db etc. but nothing seems to work. I am not getting a blocked content message when I open the db.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I would use the Click() event rather than the AfterUpdate event. When the db starts acting weird, the first thing I do is *import* the db into a fresh new db and see if the problem follow. http://www.btabdevelopment.com/ts/impnew

  7. #7
    P5C768 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2009
    Location
    Denver, CO
    Posts
    95
    Looks like changing to click() and importing to a new db worked! Thanks as always! Enjoy the snow!

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent! Another satisfied customer.
    Just finished plowing 12" so I can get my truck out.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 09-13-2010, 01:57 PM
  2. Updating using form bound to a query
    By onechriswhite in forum Forms
    Replies: 5
    Last Post: 07-25-2010, 04:04 AM
  3. Replies: 0
    Last Post: 05-09-2010, 08:43 AM
  4. Toggle Button Options
    By Matthieu in forum Forms
    Replies: 2
    Last Post: 11-23-2009, 04:05 PM
  5. Link unbound form to bound form
    By Papote in forum Forms
    Replies: 0
    Last Post: 09-25-2008, 07:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums