Full Version: Difference Between a subform and a linked form
UtterAccess Forums > Microsoft® Access > Access Forms
RowleyD
I want to have a subform that pops up with a press of a button rather than being imbedded in the parent form. Frank suggested that I create a linked form. I did that, but when the form opens, the linked fields aren't autofilled like they are in a subform.
xample:
The parent and child form are linked by ProdOrderNum, ProdOrderLine and InputNum. If I created a subform those fields would already be filled in. In the linked form, they aren't.
Any ideas on how I can get the subform functionality on the form that pops up with a button click?
AQM_UK
Okay, a pop up, is a pop up.
You need to reference the pop up to the id on the form main. Slightly concerned you have three controls that you are referencing. Do you not have a unique number for this?
Anyway, create your form to pop up.
reference the bound query to this using the Forms!frmMain!UniqueID (hopefully) or with each or your three fields mentioned above.
Then, when you have a record your user want to look at, they hit the button, open the pop up form (modally if not using pop up) and the data will be alligned.
HTH
Jim
RowleyD
I have attached the table relationships. The first two are info downloaded from our ERP system (I didn't make the table structure). ProdOrderLine is not unique. It just repeats 1000 through whatever with each ProdOrderNum. That's why I had to have concatenated keys. I guess I could take ProdOrderNum and Prod OrderLine out of the downtime table since InputNum (AutoNumber) is unique. That way, the subform (pop up) woudl only have one unique field to link.
AQM_UK
I think you have help answer your problem.
If you can do this, this is great and makes you job much easier.
Jim
RowleyD
So in this case, I would put Forms!frmMain!InputNum in the criterea of the bound query for the popup?
AQM_UK
Spot on.
o when the pop up opens, it references the unique input number and that record is shown.
Good stuff and Happy new year.
Jim
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.