Opening Sub Form

bitzgam

Registered User.
Local time
Today, 07:55
Joined
Dec 5, 2014
Messages
21
Hello everyone I have a Main Form(frmApplicants) and sub form(frmApplicantsDetails) which the Data Entry set to Yes
what I want is, if I double click the name of applicant in main form I want to popup the sub form along with the complete details of the applicant chosen in the main form. I used the DoCmd.OpenForm but my problem now is when I try to double click the applicant#2 or #3,etc the sub form will popup but not the details of applicant#2 (or the chosen applicant except applicant#1) its the details of applicant#1.

Can You help me how to solve this issue how to write the code in vba? sorry Im new to access just learning this stuff recently.

Thank YOu
God BLess :)
 
Last edited:
I think you are trying to run, before learning to walk?

The 'normal' way I believe this is done is to have your main form and the subform showing at all times.

When you add the subform to the mainform the wizard will set all the links for you, so when you move to a new record in the mainform the related data in the subform automatically refreshes.

It sounds like you are trying to do this manually rather than let Access set it up for you?. Where you put your code will have a great effect on how the forms interact.

At the least, the data source for the subform should be retrieving data that matches the mainform id or whatever field that links the two.

HTH
 

Users who are viewing this thread

Back
Top Bottom