Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Sync Form based on a listbox

Discussion in 'Information Technology' started by ortaias@hotmail.com, Jul 28, 2006.

  1. ortaias@hotmail.com

    ortaias@hotmail.com
    Expand Collapse
    Guest

    I have a listbox which can display all records or provide a limited
    list based on a filter derived from an optiongroup. The code works
    except in the one situation where the filter is changed. The problem
    appears to be "Me.[List7].Selected(1) = True" which triggers
    (sporadically) the click event for List7. The net effect is that when
    I click the option button twice the form updates as expected. The
    first click correctly updates the listbox, the second click then
    updates the form. The form also updates as expected when you scroll
    down the list. I would like to know how clicking on the option button
    will highlight the first item on the list and bring up the form's data
    on just the first click.

    Private Sub Frame33_Click()
    Select Case Frame33
    Case 0 'show all records
    Me![List7].RowSource = "SELECT [projectnum], [projectname] FROM
    projectnumqry; "
    Case Else 'show limited (filtered) list
    Me![List7].RowSource = "SELECT [projectnum], [projectname] FROM
    projectnumqry where [type]=[frame33];"
    End Select
    [Text29] = [List7].ListCount - 1
    DoCmd.GoToControl "[List7]"
    Me.[List7].Selected(1) = True <=======problem line
    End Sub
    ------------------------------------------
    Private Sub List7_Click()
    Rem Pulls-up the summary form information for the selected project
    Me.Recordset.FindFirst "[projectnum] = " & Me.[List7]
    Call setcontrols
    End Sub
     
  2. Loading...

    Similar Threads Forum Date
    Synchronicity Interfaith Dialogues Nov 18, 2007
    Apple posts iSync security fix (MacCentral) Interfaith Dialogues Apr 20, 2005
    Opinion Definition of Diety, Human Form, God and Waheguru Sikh Sikhi Sikhism Feb 1, 2016
    The Sikh Boy Who Developed Breasts And Grew Up To Don A Superhero Uniform Sikh Youth Sep 15, 2015
    World War 1 Recreated Sikh regiment comes to Brighton Royal Pavilion in full military uniform History of Sikhism Oct 3, 2014

Share This Page