Need Subform record to post in main form record (1 Viewer)

IDFUSM

New member
Local time
Today, 07:47
Joined
Jul 8, 2022
Messages
6
after filling in some items on the main form i have a combo box (Collections) that when a "collection" is selected it populates the subform with a list of the items that belong to that collection. I also have a check box that when checked i would like that line to be placed in the main forms "list" of items. how do i set up the main for to make a list of the items selected?
 

GPGeorge

Grover Park George
Local time
Today, 04:47
Joined
Nov 25, 2004
Messages
1,829
First, records are stored in tables, so the task here appears to be to add a new record to a table. That table would be, I expect, the one from which records are queried for the List Box on the main form?

This isn't uncommon, although it's not 100% clear what is involved here. What exactly is found in "... that line to be placed in the main forms "list" of items..." How does it get populated?

In theory an append query will add a new value to a record in a table, and then the list box on the main form can be requeried to make it appear in the list box. Details, though, could help make this more straightforward to describe.
 

IDFUSM

New member
Local time
Today, 07:47
Joined
Jul 8, 2022
Messages
6
Sorry, new to this.
In the main form i have a combo box that when an item is selected the subform is populated with the multiple records that are associated with it.
then in that sub form i would like to check a box that when i press the submit button it adds it to the table that is linked to the main form.
 

Minty

AWF VIP
Local time
Today, 12:47
Joined
Jul 26, 2013
Messages
10,368
It sounds like the combo is already adding records to a table related to the main form, why not simply delete the ones that aren't ticked?
 

IDFUSM

New member
Local time
Today, 07:47
Joined
Jul 8, 2022
Messages
6
i want the data from the subform table to be placed in another table so it does not modify the original.
i am going to have a customer fill in the form and select the items they want, when they press the submit form i want it to populate the table i called requests i do not want to have the check box appear in the original table. i want to be able to open the requests table and see one record with all selections.



1657287933212.png
 

IDFUSM

New member
Local time
Today, 07:47
Joined
Jul 8, 2022
Messages
6
First, records are stored in tables, so the task here appears to be to add a new record to a table. That table would be, I expect, the one from which records are queried for the List Box on the main form?

This isn't uncommon, although it's not 100% clear what is involved here. What exactly is found in "... that line to be placed in the main forms "list" of items..." How does it get populated?

In theory an append query will add a new value to a record in a table, and then the list box on the main form can be requeried to make it appear in the list box. Details, though, could help make this more straightforward to describe.
I want the data from the sub-form table to be placed in another table so it does not modify the original.
I am going to have a customer fill in the form and select the items they want, when they press the submit form Button I want it to populate the table I set up called DTO requests. I do not want to have the check box appear in the original table that the sub form data came from.
I want to be able to open the DTO requests table and see one record with all selections.
1657289819531.png
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:47
Joined
Feb 19, 2002
Messages
43,233
We are all having trouble with your request because we don't understand why you are trying to place ONE value from a child table in the parent table. Also, duplicating data is always poor practice. I get the feeling you are going about this backwards.

If you use checkboxes in a form to select rows, the checkboxes need to be bound. That means that one and only one user can be performing this function at one time. Perhaps if you think about this from the other view and the user selects from a combo to add each row, that might make more sense and not require code or append queries to acheive.
 

IDFUSM

New member
Local time
Today, 07:47
Joined
Jul 8, 2022
Messages
6
We are all having trouble with your request because we don't understand why you are trying to place ONE value from a child table in the parent table. Also, duplicating data is always poor practice. I get the feeling you are going about this backwards.

If you use checkboxes in a form to select rows, the checkboxes need to be bound. That means that one and only one user can be performing this function at one time. Perhaps if you think about this from the other view and the user selects from a combo to add each row, that might make more sense and not require code or append queries to acheive.
Ok, I think i am understanding now. let me give it a try and ill let you know how it turns out. Thank you so much for your help!
 

IDFUSM

New member
Local time
Today, 07:47
Joined
Jul 8, 2022
Messages
6
I think this is the right direction. i just need some guidance.
1. i select a collection name from a combo box
2. in the list box every thing associated with that collection should show up
3. i select an item that has three fields and i need each field to populate the form as a request list of things i have selected
4. the list may be as large as 50 items.
5. when i submit the form i would like it to the record to the Request Table

is this feasible?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:47
Joined
Feb 19, 2002
Messages
43,233
1. OK
2. Show up where? On a subform? In a listbox?
3. What is a request "list"? A list is implemented by a table. A control on a form holds ONE value.
4. it doesn't matter how large a list is.
5. Access ALWAYS saves the current record when you close a form. It also saves the current record under other circumstances. Access takes as its solemn duty to save every piece of data and to never lose anything.

We're still not talking the same language. Perhaps you could post a picture of your schema and we can try to work it out from that. Make sure the tables are expanded and we can see the relationship lines.

Let me use a different example that we should all understand to see if that is what you are trying to do.

We have a database that teachers use to store grades. There are students, tests, and grades (very simplistic). The grades table is a junction table that connects students to tests. When the teacher wants to enter the grades, he selects a test and "pushes a button". The application then runs an append query and copies a row for each student to the grades table with just the StudentID and TestID. Then the teacher opens a form for the test and enters a grade for each student.

Is this the type of process you are trying to model?
 

Users who are viewing this thread

Top Bottom