Only been using Access for just under a year in A-level Computing, and I've hit a few walls in my coursework project.
It's a football (soccer) league table with a form to input the match data, and I've got most of it working. I've got lines upon lines of coding to determine things like who the winner is and update queries to add the points into a table along with clean sheets, goal difference and games played etc.
1) Basically, the actual league table is shown through a subform on a report. It's opened through a button, and just displays a preview of the report. The *LEAGUE* table is sorted into points which, I'm sure many of you know, is the way in which league tables are ordered. However, other fields such as games played and goal difference come in to account - for example: Man Utd; 79 pts; 32 games played take a higher league position than Chelsea; 79 pts; 33 games played. Goal difference is 3rd in the sorting priority order - for example: Man Utd; 79 pts; 32 games played; +40 goal difference take a higher league position than Chelsea; 79 pts; 32 games played; 38 goal difference.
How can I sort the *LEAGUE* table in to order through more than one field? Will I need to put code into the criteria in my select query than generates the fields for the subform? Or will it not work at all in a subform? Any help appreciated but please remember I am a novice and don't have as much of an understand of Access as a lot of you seem to!!
2) Another thing - possibly more simple to answer - is what is the code to check if a form is open? All my forms for the project are open via a click event on another form by using the line of code 'DoCmd.OpenForm "FormName"'. I want an error message to appear when a user clicks on a button to open another form when a form that shouldn't be open at the same time is open. I've tried 'If "FormName".Open = True Then MsgBox "Error - please complete or close the other form"' but that didn't work . You get the jist, so a bit of help there would also be appreciated.
3) One last thing is append queries. I used to be great at them when we first started learning them in class, but I've completely forgotten them. I want to be able to add a new player to my 'All Players' table, which the values are input by the user on a form. So the user inputs the squad number, player name, position and select the team name from a combo box which takes the values from the table with the team names and team ID's in. How do I add that record to the 'AllPlayers' table. It also needs validation in that if the new player has the same squad number as a player already in that team, it shouldn't allow it.
I don't expect answers to every single thing I've asked, but any help would be extremely appreciated!
Thanks in advance