Using multiple Options in Checkboxes to add records

Local time
Today, 15:53
Joined
Mar 23, 2022
Messages
45
Suppose my form looks like this

1648443147025.png

Can I add records into the event table using multiple options in checkboxes like below :
1648444056804.png

Or can I also use List Box to add records
 
You could probably do either but Why would you?
It seems that you have a table of "athletes" and a table of "events".
Since each event can have many entrants and each athlete can be in many events, IMHO, what you need is a table to store the Pk from the athletes table and the Pk of the events table which would represent this many to many relationship correctly.
 
I don't want to use the datasheet view for entry of events for a particular athlete. I want to use checkboxes or list boxes for data entry of events of a particular athlete into the events table.
You could probably do either but Why would you?
It seems that you have a table of "athletes" and a table of "events".
Since each event can have many entrants and each athlete can be in many events, IMHO, what you need is a table to store the Pk from the athletes table and the Pk of the events table which would represent this many to many relationship correctly.I dont want to use
 
I don't want to use the datasheet view for entry of events for a particular athlete. I want to use checkboxes or list boxes for data entry of events of a particular athlete into the events table.
The problem with that approach is as you add new events , you need to amend the form each time? :(

Most people would use a process where the new event is just added as a new record. No form amendment required.
 
The problem with that approach is as you add new events , you need to amend the form each time? :(

Most people would use a process where the new event is just added as a new record. No form amendment required.
Yes, Thats true.
But I can use List Box with Multiple Selection Right. The events can be linked to the events type table. Can you help me with Multi Selection List Box.
 
Last edited:
Your tables should use a junction table as @bob fitz points out. This demonstrates inserting, removing, and displaying reccords using the MultiSelect. It is done on a popup, but you could do it on the main form as well.

There is another example here doing it with a fake Multi value field control.

In either case you will need an insert query and a delete query. I tried to make this somewhat universal, but will likely take some code.
 

Attachments

Your event table doesn't make sense. I would expect it to have a date and perhaps a finish place.
 

Users who are viewing this thread

Back
Top Bottom