Don't use the wizard and create it manually.
Using Subforms
Community,
Thank you all for helping me with my first project in Access. I am trying to use the subform wizard to create child records with a combo box and list of items already selected. When I insert a subform, I want to use a query but it will only allow me to use existing forms.
I tried creating a form to use, but I can't get what I want. Any suggestions?
John
Microsoft 365 and Office | Access | For business | Windows
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
11 answers
Sort by: Most helpful
-
Anonymous
2022-02-23T17:01:48+00:00 -
Anonymous
2022-02-23T17:43:53+00:00 Create the subform independently of the parent form in exactly the same way as you'd create a stand-alone form. Save it, and then select it in the navigation pane and drag and drop it onto the parent form in form design view. Then position and size it as desired and, if it is to be linked to the parent form set the LinkMasterFields and LInkChildFields properties of the subform control. These are normally the primary key of the parent form's recordset, and the relevant foreign key in the subform's recordset.
-
Anonymous
2022-02-23T17:56:15+00:00 Thanks Guys
I have been trying several things, I will work with this advise.
-
Anonymous
2022-02-23T19:44:01+00:00 Hey Guys, I'm close but getting an error. My main form has a field, tblPartTracker.PartID and my subform has a field PartID. So, this is how I set up the subform linker.
This makes sense, I understand what its doing.
My subform looks like this in Design view.
In form view
It is not putting the PartID in the table and I get this error.
This is the Property Sheet
Any ideas?
Thanks John
-
ScottGem 68,780 Reputation points Volunteer Moderator
2022-02-24T00:53:54+00:00 First, as advised I almost always create my subforms independently. Second, why are you using a query as the Recordsource for the main form? And does the PartID appear in that query?
Also what is the SQL for that query?