Solved Update a subform from another subform (1 Viewer)

TheTank88

New member
Local time
Today, 00:18
Joined
Jun 6, 2023
Messages
3
Hi all, I am trying to create a database for my cricket club. My first issue is I have a main form called Player on it I have 2 subforms one called PlayerStats and one called SeasonStats.
I want to enter details in the SeasonStats to then add to the overall PlayerStats.
I have this but it's not working any guidance would be great.

[PlayerStats].Games.Value=Sum([SeasonStats].Games.Value)
 

bob fitz

AWF VIP
Local time
Today, 00:18
Joined
May 23, 2011
Messages
4,727
Hi all, I am trying to create a database for my cricket club. My first issue is I have a main form called Player on it I have 2 subforms one called PlayerStats and one called SeasonStats.
I want to enter details in the SeasonStats to then add to the overall PlayerStats.
I have this but it's not working any guidance would be great.

[PlayerStats].Games.Value=Sum([SeasonStats].Games.Value)
Can you post a copy of the db
 

Gasman

Enthusiastic Amateur
Local time
Today, 00:18
Joined
Sep 21, 2011
Messages
14,310
I would say store the data once, then calculate for the rest?
 

MajP

You've got your good things, and you've got mine.
Local time
Yesterday, 19:18
Joined
May 21, 2018
Messages
8,529
Hate to say it, but you are probably going to have to redo most of the tables. It does not appear "normalized" in any way.
We can help, if willing to do this correct. Looks like you are repeating information. If designed correctly it will actually be a lot easier to maintain and use.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 00:18
Joined
Sep 12, 2006
Messages
15,658
Why would you need to update (ie modify) a season stat? A season stat ought to be a total of game stats.

If you add details of a new match, or edit/change an existing stat, then you might need to requery the form that shows the season stats, if it is open.

This should all start from an individual match stat. (Possibly an innings stat to be honest). I am not precisely sure how you would design a cricket database to be honest. Would you actually store details of every ball bowled individually?
 

bob fitz

AWF VIP
Local time
Today, 00:18
Joined
May 23, 2011
Messages
4,727
Hate to say it, but you are probably going to have to redo most of the tables. It does not appear "normalized" in any way.
We can help, if willing to do this correct. Looks like you are repeating information. If designed correctly it will actually be a lot easier to maintain and use.
I would have to agree with that. The OP would also be wise to remove the spaces and special keys used in the names of objects e.g. field names and form names etc. Also adopt a naming convention.
 

TheTank88

New member
Local time
Today, 00:18
Joined
Jun 6, 2023
Messages
3
Why would you need to update (ie modify) a season stat? A season stat ought to be a total of game stats.

If you add details of a new match, or edit/change an existing stat, then you might need to requery the form that shows the season stats, if it is open.

This should all start from an individual match stat. (Possibly an innings stat to be honest). I am not precisely sure how you would design a cricket database to be honest. Would you actually store details of every ball bowled individually?
The idea is to input the data at the end of the season. To add to the historical stats(PlayerStats). To be honest I am not precisely sure how you would design a cricket database either 😄. I haven't done any access work for 20 years and then it was basic stuff at school!
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:18
Joined
Feb 19, 2002
Messages
43,293
Welcome aboard:) Being from the other side of the pond, I know nothing about cricket except that wickets can be sticky;). As the others have already mentioned, you have a very shaky foundation and I would not continue without fixing it. You might do some searching to see if you can find a sample database. I don't see anything relevant but you might find an actual template if you search.

The problem with the tables as they are defined is that you won't be able to use them to calculate statistics because they are not properly normalized so it would be a waste of time to enter data into them.

Maybe someone who understands the game can give you some ideas on basic tables to get you started.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 00:18
Joined
Sep 12, 2006
Messages
15,658
Welcome aboard:) Being from the other side of the pond, I know nothing about cricket except that wickets can be sticky;). As the others have already mentioned, you have a very shaky foundation and I would not continue without fixing it. You might do some searching to see if you can find a sample database. I don't see anything relevant but you might find an actual template if you search.

The problem with the tables as they are defined is that you won't be able to use them to calculate statistics because they are not properly normalized so it would be a waste of time to enter data into them.

Maybe someone who understands the game can give you some ideas on basic tables to get you started.
I am pretty sure cricket is broadly similar to baseball, but with different stats? No errors, no RBIs and so on. Would baseball stats monitor pitcher performance by each different inning? Is stuff like that critical in baseball? In cricket it might be to some extent, but it's more that the structure of the two sports shares a lot of common features.
 

mike60smart

Registered User.
Local time
Today, 00:18
Joined
Aug 6, 2017
Messages
1,910
The idea is to input the data at the end of the season. To add to the historical stats(PlayerStats). To be honest I am not precisely sure how you would design a cricket database either 😄. I haven't done any access work for 20 years and then it was basic stuff at school!
Hi

Your relationships should be along the lines of the attached.
 

Attachments

  • Relationships.jpg
    Relationships.jpg
    138.7 KB · Views: 51

mike60smart

Registered User.
Local time
Today, 00:18
Joined
Aug 6, 2017
Messages
1,910
As Pat suggested here with the rough draft

Needs more work
 

Attachments

  • Cricketcopy.zip
    231.7 KB · Views: 65

Users who are viewing this thread

Top Bottom