By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,779 Members | 1,291 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,779 IT Pros & Developers. It's quick & easy.

Master/Child Link Problem

P: 1
Good afternoon,

I am struggling with my main form and subform links.
I have a main form (frmFacility) primary key [facilityID] with a command button to open a subform (frmInspectService) foreign key [facilityID]
This works except for the fact that the subform shows all the records and not just the ones related to the main form. I have my relationships set and have added the follow code to the on click event of the command button.

DoCmd.RunCommand acCmdSaveRecord
If Me.FacilityID & "" = "" Then DoCmd.OpenForm "frmInspectService", acNormal, , , acFormEdit, acWindowNormal
DoCmd.OpenForm "frmInspectService", acNormal, "[FacilityID]=" & Me.FacilityID, , acFormEdit, acWindowNormal
End If

Exit Sub

MsgBox err.Description
Resume Exit_Command416_Click

There does'nt seem to be a property for the pop-up form to set the Master/Child relationship.

Any Ideas ?
Thanks again in advance.
Oct 9 '07 #1
Share this Question
Share on Google+
1 Reply

P: 3
I think you missed out one comma:

DoCmd.OpenForm "frmX", acNormal, , "[FacilityID]=" & Me.FacilityID
Oct 9 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.