Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Sync Form based on a listbox

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

  1. ortaias@hotmail.com

    Expand Collapse

    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

Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     

Share This Page