Results 1 to 6 of 6
  1. #1
    dimoc is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Apr 2014
    Posts
    5

    Shape Effect on Toggle Buttons

    I have a questions database. On my Form, I have an Option Group with 4 toggles for the correct answers. Each of the toggles, is tied to the Answer's column in the database. Currently, I have Shape Effect => Bevel => Circle for all 4 buttons no matter what their value is. I cannot figure out a way to change to Shape Effect => Bevel => Relaxed Inset if a specific toggle button is set to the Answer.
    Attached Thumbnails Attached Thumbnails help.jpg  

  2. #2
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    I would set the property of the control

    the button being the control

    the property being the control's property

    VBA would be me.control.property = change

    now I don't know what your control name is, what property you want to change it to.

    As for the how

    You could use an if or a case statement in VBA.

  3. #3
    dimoc is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Apr 2014
    Posts
    5
    So I have this but I get an error. "The expresion On Load you entered as the event property setting prodecued the following error: Procedure declation does not match description of event or procedure having the same name.


    [Private Sub optgroup_Answers_BeforeUpdate()
    Select Case Me.optgroup_Answers
    Case 1
    Me.toggleA.Bevel = BevelEffectRelaxedInset
    Case 2
    Me.toggleB.Bevel = BevelEffectRelaxedInset
    Case 3
    Me.toggleC.Bevel = BevelEffectRelaxedInset
    Case 4
    Me.toggleD.Bevel = BevelEffectRelaxedInset
    End Select
    End Sub]

  4. #4
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    http://office.microsoft.com/en-au/ac...080201162.aspx

    give it the right value not beveleffectrelaxedinset

    i.e. 2

    bevel effect relaxed inset is the effect not the value

  5. #5
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    The following worked for me. I have used numbers instead of alphabets to loop through them easily.Give it a try
    Code:
    Sub ToggleEffect()
        Dim i As Integer
        For i = 1 To 3
            If i = Me.optgroup_Answers.Value Then
                Me("Toggle" & i).Bevel = 2   ' Play with this value to get the right effect
            Else
                Me("Toggle" & i).Bevel = 0
            End If
        Next i
    End Sub

  6. #6
    dimoc is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Apr 2014
    Posts
    5
    Thank you amrut and Ruegen. It worked.

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

Similar Threads

  1. procedure for basic shape operations
    By mo76 in forum Programming
    Replies: 2
    Last Post: 02-16-2014, 11:51 AM
  2. Calculations Per Row Effect
    By gatsby in forum Access
    Replies: 29
    Last Post: 05-26-2013, 07:33 PM
  3. Replies: 1
    Last Post: 06-16-2012, 02:50 PM
  4. Hierarchical reports with ADO shape
    By schetlur in forum Reports
    Replies: 0
    Last Post: 07-30-2009, 12:21 PM
  5. Shape of data on report
    By stvgarner in forum Reports
    Replies: 0
    Last Post: 06-15-2009, 01:28 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