473,466 Members | 1,338 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Copying field to another table when y/n is selected

7 New Member
I am a PE teacher and am trying to create a more efficient way of keeping score for our Cup Stacking tournaments. I have started the database, but am now a little stuck. Cup stacking has three categories and I will need to keep track of three times from each student. The categories are the 3-3-3, 3-6-3, and the cycle. They get three tries in each. I have created a table with student info (ID, name, etc.) and I put yes/no boxes for them to choose the games. They can only choose two. If they check the 3-3-3 box, for example, I want their ID and name to be copied to the 3-3-3 table. I would also like them to be able to choose only two boxes, if possible. I have also created a 3-3-3 table with time1, time2, and time3. Thanks
Nov 1 '19 #1
3 1581
Seth Schrock
2,965 Recognized Expert Specialist
I highly recommend looking at Database Normalization and Table Structures. Basically you need a table each for students, categories, and tries. You then need another table to join those tables together that also has a score field in it. For example
Expand|Select|Wrap|Line Numbers
  1. tblStudents
  2. StudentID_pk
  3. StudentName
  4. ...
Expand|Select|Wrap|Line Numbers
  1. tblCategories
  2. CategoryId_pk
  3. Category
  4. ...
Expand|Select|Wrap|Line Numbers
  1. tblTries
  2. TryId_pk
  3. Try
Expand|Select|Wrap|Line Numbers
  1. tblScores
  2. ScoreId_pk
  3. StudentId_fk
  4. CategoryId_fk
  5. TryId_fk
  6. Score
This may seem like a bit of a hassle, but having the data stored this ways allows you to fully utilize the data that you have. For example, it is very easy to return the highest score, or the average score, or see if most students do better or worse on their second try compared to their first. You save yourself many headaches when you store the data properly.

However, you may want to display the data in a more user-friendly manner. There are many ways to do this, but the first that pops into my mind would be to have a form listing your students with a subform allowing to select which categories they will be a part of (based on tblScores). You could then open another form which will allow you to enter the scores for each try (again based on tblScores). Again, this is just one method of displaying the data and isn't necessarily the right way. Only you can determine how the user should interact with the data.
Nov 4 '19 #2
Chris Oneal
7 New Member
Thanks for the reply. I have made the form and table for the students to "register" their entry into the tournament. They are to enter their Student ID, First name, last name, school, and then select with the y/n box the games (3-3-3, 3-6-3, or cycle).I have attached an example of what the time sheets look like. I want to find a way where it will populate a table of ex. 3-3-3 when the student selects the 3-3-3 check box. In your example you have TryID, will i create for example 3-3-3Try1, 3-3-3Try3, 3-3-3Try3, 3-6-3 Try1, ...?, and I don't know what how I could create a primary key on that one? Sorry, I have kids coming in now. I have until next Oct. or Nov. to get this done. Thanks a lot for your help.
Attached Files
File Type: docx cupstacking time sheet.docx (12.5 KB, 60 views)
Nov 5 '19 #3
NeoPa
32,556 Recognized Expert Moderator MVP
Hi Chris.

May I suggest that your next step should be to read the linked article then reply in such a way as to indicate you've understood the contents, at least to a basic level.

To continue any sort of discussion on this without that very fundamental pre-requisite would be a total waste of everybody's time - yours included.

As a general rule it always makes good sense in such written 'conversation's to include clear indications of an understanding of all intevening posts so that both sides of the conversation can understand what it is they're dealing with.
Nov 5 '19 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Caroline | last post by:
I need to update a table by copying a column from another table (having the same structure, but on another database), from the record having the same primary key. 1 - What is the correct...
6
by: Sven Pran | last post by:
Probably the answer is there just in front of me only awaiting me to discover it, but: 1: I want to build a query that returns all records in one table for which there is no successful "join"...
4
by: Dave Brydon | last post by:
Access 2003 I have a combo box in my personnel table, which draws its data from a trade code table; the original field in the code table, is numeric, Long Integer, and formatted with 5 zero's . ...
3
by: wvmbark | last post by:
First time poster... I just found this forum and it appears there's plenty of people here that could make short work of problem that's been driving me absolutely bonkers for months. Every day we...
4
by: paulcrowsnest | last post by:
Hi everyone This is probably really simple, but it has me stumped. I have a form which gets its data from a table called "Dentistry", this table is linked to another table called...
4
by: billa856 | last post by:
Hi, I want to know how can we set the value of Textbox = value of field in table when we select a value form combobx. example i have a table customer CID CNAME CSALARY 1 Billa ...
2
by: Hanny J | last post by:
I am making a database for a dress shop, which hires and sells prom dresses. I am creating a form where the user selects the customer using a list box and then using a combo box to select a dress....
1
by: Scott Martinek | last post by:
I created a form (Base_Data_Form) that updates a table (Base_Data) and I created a combo box to populate the account number from a different table (0004_All_Accounts) when the account number is...
1
by: Scott Martinek | last post by:
I created a form (Base_Data_Form) that updates a table (BaseDataTbl) and I created a combo box to populate the account number from a different table (0004_All_Accounts) when the account number is...
0
by: Abdi Tena | last post by:
<!DOCTYPE html> <html> <head> <script type="text/javascript"> var holdPrevesScore=0;//holds evaluation of pervious person. function sumOfEvaluation(form) { var control, controls =...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.