Form/Subform Help

pinkpanther6666

Board Regular
Joined
Feb 13, 2008
Messages
193
Office Version
  1. 365
Platform
  1. Windows
Good Afternoon All



i have a form which contains a sub-form

The form has one field in called Team and the sub-form has various fields of which one is called team


The database is used to collect weekly results and to create League tables and reports and create web-pages for uploading to the internet.

My problem is that the field in the form named Team, i want this to have a record for each week and not having all the results for the season in one record.

Can anyone point me in the right direction or create a bare bones database to see how it is done and i can adapt that into my database


Many Thanks again


Steve
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
your subtables (and forms) would be
tRoster (of players for 1 team)
tGames, a list of GameDates. and the scores for each

the form can show tabs to see different subforms
Roster
Games
etc...

other tables:

tGames tbl:
GameID (auto)
GameDate
HomeTeamID (long)
VisitorTeamID (long)
HomeTeamScore
VisitorTeamScore
WinnerID (long)
 
Last edited:
Upvote 0
Thanks for your reply

What i am trying to do is the combo box in the form to have multiple entries
ie i have 4 teams
Record No 1 is for Team 1 and week 1
Record No 2 is for Team 2 and Week 1
Record No 3 is for Team 3 and Week 1
Record No 4 is for Team 4 and Week 1
Record No 5 is for Team 1 and Week 2
Record No 6 is for Team 2 and Week 2
etc.........

and on the subform for the records contains the result,score and Points etc


Hope this helps

Steve
 
Upvote 0
Just had a thought

Would multiple combo boxes in the form be the answer ie Team and Week ??

Steve
 
Upvote 0
The statement on the image is incorrect. They are on record 1, not 4. Using team and week combos, you can have any valid combination of team and week, but they will be singular; i.e. anything in week 2 for team 1 - not week 2 to week 4 for teams 1 and 6. If I'm not mistaken, 6 teams with a 10 week schedule will present you with 60 combinations eventually, so are you OK with that? Once a combo list gets to a certain point, it's often time to think about using a listbox instead.

If you wanted to try and present it as a 2 column combo, build a query first that gives you want you want, then set the combo's rowsource property to be that query.
 
Last edited:
Upvote 0
The statement on the image is incorrect. They are on record 1, not 4. Using team and week combos, you can have any valid combination of team and week, but they will be singular; i.e. anything in week 2 for team 1 - not week 2 to week 4 for teams 1 and 6. If I'm not mistaken, 6 teams with a 10 week schedule will present you with 60 combinations eventually, so are you OK with that? Once a combo list gets to a certain point, it's often time to think about using a listbox instead.

If you wanted to try and present it as a 2 column combo, build a query first that gives you want you want, then set the combo's rowsource property to be that query.


yes will have a look into that

many thanks


steve
 
Upvote 0
The 2 combo Boxes in my form are called Team and Week

When you change the Team Combo the results only come up with that team in the subform, which is good
However i need to only select a certain week for that team and i have been looking at combo dependancies

Ive got the following code but doesnt work

SELECT DISTINCT Team.ID, Team.Team, Week.ID, Week.Week FROM Team, Week WHERE ((([Week].[Week])=[Form]![Combo61]));

has anyone got any ideas as to why this doesnt work

Many thanks again


Steve
 
Upvote 0
Look at posting tip #1 - doesn't work doesn't help.:confused:
That sql is for what, the subform? The 2nd combo?
Also, did you try making the query you needed as per post 6?
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,375
Members
448,888
Latest member
Arle8907

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top