Getting parent form to respond to subform

  • Thread starter Thread starter VBAn00bz
  • Start date Start date
V

VBAn00bz

Guest
Gday
I'm building a client database, and have nearly completed the main data ebtry form. However, I would like to add some search functionality to this form.
The main form shows all the details of the client, and I have created a subform below this to conduct Lastname or MemberNumber searches on. The search runs successfully -- I am able to bring up a datasheet view of a list of all clients with "lastname = x" or "MemberNumber = y" in the subform.
However I would like to be able to go to that particular record on the main form when I select it on the subform.
I have tried all sorts of different methods, but since I am a newbie to VBA, I dont know the correct way to do it. If anyone could give me some advice as to how to update the main form from a selection on the subform it would be much appreciated.
Thanks.

PS Using Access2000, and the subform is not linked to the mainform as it is only used for searches. I have tried adding a procedure in the on_getfocus event of the MemberNumber field on the subform, but Im not sure how to get the main form to navigate to display that Members details.
 
I have a sample Lookup form that incorporates a listbox to display all relevant records. Then using the bookmark property will display the record that is double clicked in the list box. It's in Access97, but you should be able to convert it. Shall I email it to you?
 
Thanks, that would be great. My address is whitespider53@hotmail.com .Im not fully familiar with the bookmark propperty yet, Ill have to find out about it.
 

Users who are viewing this thread

Back
Top Bottom