Repost: Find record in Form1 from form2

K

Kaur

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
 
G

Guest

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

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

Kaur

Thanks ever so much. This is the mistake I was making. I requery only
the subform and it works fine.
schasteen said:
Instead of refreshing the entire form, have you tried just refreshing the
subform.

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

Kaur said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top