Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Business Applications
Tag Cloud
access acer asus batch bios bsod crash desktop driver drivers error ethernet excel freeze gaming gpu hard drive hardware hdmi internet laptop malware memory modem monitor motherboard netgear network printer problem ram registry router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > Business Applications >
Solved: access 2007, subform isn't doing what I want

Reply  
Thread Tools
7omislav's Avatar
Member with 38 posts.
 
Join Date: Feb 2008
Experience: Beginner
02-Jan-2009, 01:22 PM #1
Solved: access 2007, subform isn't doing what I want
First, Happy New Year to all of you
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
02-Jan-2009, 01:24 PM #2
Happy New Year to you too.
What do you want the Subform to do?
7omislav's Avatar
Member with 38 posts.
 
Join Date: Feb 2008
Experience: Beginner
02-Jan-2009, 01:28 PM #3
I have some spare time to redesign database for my club and seems that I have stumbled to a wall here..

OK, what i have is a Competitors table and a Competitions table, with the third table of Results, which holds the CompetitorID, CompetitionID and Position.
The Relationships between the Tables is "1 to Many" from the Competitor to the Results table and a "1 to Many" from the Competition to the Results Table.

I need to make a Form to enter competition details with subform where I can choose competitors and enter results.

I also need to make it do the math (I got the answer to that he
Lets say, for example, Jack has won the gold medal in State championship and he also won 4 matches
7(for gold) + 4*1(for victories) = 11 points
(I got the answer to that here a few months ago but started to implement it just now)

With forms wizard I just got subform that prompts me to enter names.
I already have Competitors table full with names and want to choose from existing names and not to enter same names every time...
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
02-Jan-2009, 01:34 PM #4
Ok, use a Query based on your Results Table as the Record Source for your Subform.
Now add a Combo Box based on your Competitors Table (or better still a Query of it) and set it's Control Source to the CompetitorID on your Form.
Now do the same for Competitions set it's Control Source to the CompetitionID.
This will allow you to just Choose data from the other tables to go in to this Form/Table.
You can manipulate the SQL of the Combos to show Competitior Names and Competition Names instead of the IDs by setting the ID columns width to Zero cms.
__________________
OBP
I do not give up easily
7omislav's Avatar
Member with 38 posts.
 
Join Date: Feb 2008
Experience: Beginner
02-Jan-2009, 01:54 PM #5
I have been messing with the database from our previous discussion here and 'Competition Detail' form is the problem for me
Attached Files
File Type: zip Competitions V1.2.zip (39.1 KB, 15 views)
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
02-Jan-2009, 02:03 PM #6
Ok, I have it, You have the main form as Competitions. So that will currently take care of the CompetitionID on the Subform, so you really need the Competitions Combo on the MainForm, so that you can "Find a Competition".
7omislav's Avatar
Member with 38 posts.
 
Join Date: Feb 2008
Experience: Beginner
02-Jan-2009, 02:07 PM #7
Yes, I know - so I converted it to 2003 format
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
02-Jan-2009, 02:17 PM #8
OK, I can't get it to do what you need, it keeps crashing.
This is what it needs.
1. On the Subform, delete the Competitions Combo (that is the part I can't do.
2. On the Main/Sub Forms reset the Master Child Links from ID to ID to ID to ID_Competition. (This part I can do.)
3. Add a "Find a Matching Record on my Form " type Combo on to the mainform. (I can do, but there are no records to test it with).
__________________
OBP
I do not give up easily
7omislav's Avatar
Member with 38 posts.
 
Join Date: Feb 2008
Experience: Beginner
02-Jan-2009, 02:31 PM #9
I have done 1. and 2.
'Competition Results' subform isn't doing the math - I think the VBA code behind it needs tweaking
Attached Files
File Type: zip Competitions V1.3.zip (40.4 KB, 8 views)
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
02-Jan-2009, 02:32 PM #10
I will have to get back to you on this tomorrrow, it is my Wife's turn to use the Computer now.
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
02-Jan-2009, 02:36 PM #11
You don't have any Column 2,3,4 or 5 in Combo10.
You have moved it, so it needs to be
me.parent.combo10
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
03-Jan-2009, 08:12 AM #12
Is this version doing what you want?
Attached Files
File Type: zip Competitions V1.3.zip (43.4 KB, 4 views)
7omislav's Avatar
Member with 38 posts.
 
Join Date: Feb 2008
Experience: Beginner
03-Jan-2009, 08:37 AM #13
We are getting close, I mean - you are getting close - thanks for the help
Scoring was off in your version and I changed it, so I think it is OK now.
What should I do to prevent selecting same competitor twice in Combo12 ?
Attached Files
File Type: zip Competitions V1.4.zip (37.1 KB, 7 views)
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
03-Jan-2009, 08:54 AM #14
That is a little tricky, I use another field in the Many to Many Table which combines both the CompetitiionID and the CompetitorID and then set it to Indexed with No Duplicates.
This allows "many" versions of the Competition and Competitor, but only one of them together.
I use VBA to combine them in a hidden field on the subform
__________________
OBP
I do not give up easily
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
03-Jan-2009, 09:25 AM #15
Like this.
Attached Files
File Type: zip Competitions V1.4.zip (36.3 KB, 29 views)
Reply

Tags
access

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 02:50 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.