Showing list of subrecords tied to the main record (1 Viewer)

JMongi

Active member
Local time
Today, 03:20
Joined
Jan 6, 2021
Messages
802
My idea for the form I'm working on is to have a section that is a compilation of addable "subrecords" for lack of a better description.
1.User completes main part of form
2. User adds a variable number of subrecords using command buttons (click button, fill out subform, save).
3. These cumulative subrecords are shown in the main form.

The subrecords have their own PK and FK to the main form record.
I can't wrap my mind around how to structure the query for the subform to display the list of subrecords.

I'm in the process of adding dummy data to structure so I can start testing out various implementations to see what works, but I thought I would post here as well. This seems like something that would have been done before.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 02:20
Joined
Feb 28, 2001
Messages
27,223
Insufficient description. Are these sub-records all the same format but different attributes? Are they like sub-records of line items in an invoice (as a simple example)?

What you describe COULD be as simple as a parent/child form where the child form is a continuous sub-form. It COULD be a lot more complex. I think we might need a bit more descriptive (ENGLISH, not code) text on these sub-records.
 

JMongi

Active member
Local time
Today, 03:20
Joined
Jan 6, 2021
Messages
802
These forms are broadly similar in format (not neccessarily presentation) in that they are bucket of text fields to be completed to take snapshot (test results, current equipment status readouts, etc).

Your example of a line item/invoice seems like it would apply. But, it's not feasible (imo) to list all of the child data like you would on a line item on an invoice. To continue your line item illustration I would be looking for it to say "Line Item 1" and that's about it (mabye a "Line Item Generic Description"). The user (or future viewer) would need to click into the line item to view all of the relevant data in a more suitable format.

To merge your illustration with my original description - "These cumulative subrecords are shown in the main form" could be more correctly stated as a line item indicating a subrecord exists is shown in the main form.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:20
Joined
Feb 19, 2002
Messages
43,352
I think that made it worse:) The subform always shows the records with the FK of the main form record. As you run append queries to add rows to the child table, you would need to requery the subform in order to have them show up.
 

JMongi

Active member
Local time
Today, 03:20
Joined
Jan 6, 2021
Messages
802
Probably :)
I think I've already figured out a bit more of what I need to do. But, before I can further this conversation I need to have a few more basic forms working so I can add data more easily for testing. Should be soon.
 

Users who are viewing this thread

Top Bottom