Welcome to SPN

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

Sign Up Now!

Listbox afterupdate

Discussion in 'Information Technology' started by Ross, Jul 28, 2006.

  1. Ross

    Ross
    Expand Collapse
    Guest

    Hi Guys
    Have a PopUp form with a listbox which with afterupdate trigger displays the
    requested record on that popUp form. Is there anyway to display this same
    record on the main form as well without locking the record on the main form
    through a filter?
    Cheers Ross
     
  2. Ken Sheridan

    Ken Sheridan
    Expand Collapse
    Guest

    Ross:

    In the AfterUpdate event procedure of the list box on the popup form return
    a reference to the main form and then to its RecordsetClone. You can then
    find the matching record and synchronize the mains form's Bookmark with that
    of its RecordsetClone, e.g.

    Dim frm As Form
    Dim rst As Object

    Set frm = Forms!YourMainForm
    Set rst = frm.Recordset.Clone

    rst.FindFirst "MyID = " & YourListBox
    frm.Bookmark = rst.Bookmark

    Ken Sheridan
    Stafford, England

    "Ross" wrote:

    > Hi Guys
    > Have a PopUp form with a listbox which with afterupdate trigger displays the
    > requested record on that popUp form. Is there anyway to display this same
    > record on the main form as well without locking the record on the main form
    > through a filter?
    > Cheers Ross
     
  3. Ross

    Ross
    Expand Collapse
    Guest

    You Star Ken
    Works a treat
    Cheers Ross

    "Ken Sheridan" wrote:

    > Ross:
    >
    > In the AfterUpdate event procedure of the list box on the popup form return
    > a reference to the main form and then to its RecordsetClone. You can then
    > find the matching record and synchronize the mains form's Bookmark with that
    > of its RecordsetClone, e.g.
    >
    > Dim frm As Form
    > Dim rst As Object
    >
    > Set frm = Forms!YourMainForm
    > Set rst = frm.Recordset.Clone
    >
    > rst.FindFirst "MyID = " & YourListBox
    > frm.Bookmark = rst.Bookmark
    >
    > Ken Sheridan
    > Stafford, England
    >
    > "Ross" wrote:
    >
    > > Hi Guys
    > > Have a PopUp form with a listbox which with afterupdate trigger displays the
    > > requested record on that popUp form. Is there anyway to display this same
    > > record on the main form as well without locking the record on the main form
    > > through a filter?
    > > Cheers Ross

    >
     

Share This Page