Welcome to SPN

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

Sign Up Now!

Repost: Find record in Form1 from form2

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

  1. Kaur

    Kaur
    Expand Collapse
    Guest

    I am reposting this message. I am a beginner using MS Access. I am
    working in MS Access 2000 and have created two forms. Form 1 is called
    frmParent (which has a read only subform called SfrmChild). FrmParent
    has a list box that lists all the Last Names of parents in the db.
    Clicking on one of the lastname of parent in the list box shows
    children of selected parent in the SfrmChild. I have a button on
    frmParent that opens up a pop up form where user can add children to
    the selected parent.
    My problem is when I close the pop up form, it refreshes the subform
    but does not take me to the selected parent for whom I added the
    children. For example if I added children for Mr.Smith, the children
    gets added to subform but closing the pop up form does not take me to
    Mr. Smith's record. It takes me to the first record by ascending order
    in the list box. If Mr. smith ID is 2 and Mr. Jackson ID is 1, after
    adding the children for Mr. smith and closing the pop up form the
    record for Mr. Jackson is shown in frmParent. I want to see Mr. Smith's
    record along with added children in the subform.
    I understand I can directly add the recods in the subform and save all
    the hastle but this is how the client wants to see the records added to
    subform.
    I will appreciate any help.


    Thanks
     
  2. Loading...

    Similar Threads Forum Date
    Pathfinder Joins Sikh Philosophy Network! New SPN'ers Sep 5, 2016
    The Salmon Story, Finding Home Sikh Sikhi Sikhism Jul 29, 2016
    Sikhi Guru Nanak's Methodology Of Finding Truth Sikh Sikhi Sikhism Jan 1, 2016
    Movies Ashdoc's movie review---Finding Fanny ( English version ) Theatre, Movies & Cinema Sep 15, 2014
    Leisure Can someone pls help me find this Waheguru Simran...?? Business, Lifestyle & Leisure Aug 5, 2014

  3. schasteen

    schasteen
    Expand Collapse
    Guest

    Instead of refreshing the entire form, have you tried just refreshing the
    subform.

    Forms![frmParent]![SfrmChild].form.requery

    "Kaur" wrote:

    > I am reposting this message. I am a beginner using MS Access. I am
    > working in MS Access 2000 and have created two forms. Form 1 is called
    > frmParent (which has a read only subform called SfrmChild). FrmParent
    > has a list box that lists all the Last Names of parents in the db.
    > Clicking on one of the lastname of parent in the list box shows
    > children of selected parent in the SfrmChild. I have a button on
    > frmParent that opens up a pop up form where user can add children to
    > the selected parent.
    > My problem is when I close the pop up form, it refreshes the subform
    > but does not take me to the selected parent for whom I added the
    > children. For example if I added children for Mr.Smith, the children
    > gets added to subform but closing the pop up form does not take me to
    > Mr. Smith's record. It takes me to the first record by ascending order
    > in the list box. If Mr. smith ID is 2 and Mr. Jackson ID is 1, after
    > adding the children for Mr. smith and closing the pop up form the
    > record for Mr. Jackson is shown in frmParent. I want to see Mr. Smith's
    > record along with added children in the subform.
    > I understand I can directly add the recods in the subform and save all
    > the hastle but this is how the client wants to see the records added to
    > subform.
    > I will appreciate any help.
    >
    >
    > Thanks
    >
    >
     
  4. Kaur

    Kaur
    Expand Collapse
    Guest

    Thanks ever so much. This is the mistake I was making. I requery only
    the subform and it works fine.
    schasteen wrote:
    > Instead of refreshing the entire form, have you tried just refreshing the
    > subform.
    >
    > Forms![frmParent]![SfrmChild].form.requery
    >
    > "Kaur" wrote:
    >
    > > I am reposting this message. I am a beginner using MS Access. I am
    > > working in MS Access 2000 and have created two forms. Form 1 is called
    > > frmParent (which has a read only subform called SfrmChild). FrmParent
    > > has a list box that lists all the Last Names of parents in the db.
    > > Clicking on one of the lastname of parent in the list box shows
    > > children of selected parent in the SfrmChild. I have a button on
    > > frmParent that opens up a pop up form where user can add children to
    > > the selected parent.
    > > My problem is when I close the pop up form, it refreshes the subform
    > > but does not take me to the selected parent for whom I added the
    > > children. For example if I added children for Mr.Smith, the children
    > > gets added to subform but closing the pop up form does not take me to
    > > Mr. Smith's record. It takes me to the first record by ascending order
    > > in the list box. If Mr. smith ID is 2 and Mr. Jackson ID is 1, after
    > > adding the children for Mr. smith and closing the pop up form the
    > > record for Mr. Jackson is shown in frmParent. I want to see Mr. Smith's
    > > record along with added children in the subform.
    > > I understand I can directly add the recods in the subform and save all
    > > the hastle but this is how the client wants to see the records added to
    > > subform.
    > > I will appreciate any help.
    > >
    > >
    > > Thanks
    > >
    > >
     

Share This Page