Filter a form field based on the value of another in that form

kitandy

Registered User.
Local time
Today, 14:38
Joined
Sep 30, 2015
Messages
34
Hi
I have a database recording competition entry's and results.
The competition has a range of numbered classes each of which is awarded first , second and third. Monetary prizes are awarded but values vary depending on class.
I have created
A table (classes)
A table (Prizes) which records the prize values for each of the 200 classes with the "Class" field on a lookup from the classes table
Now to the results
My Results 1 table contains the fields
Results 1 ID
Class - on a lookup from the classes table
Date logged
My Results 2 table contains the fields
Results 2 ID
Results 1 ID
Class
Position - on a lookup which included place and prize (storing the place) from the Prizes table
Entrant - on a lookup from the contacts table
Prize
I have created a query that looks up all the fields in Results 2 and used this to create a sub form Results 2
I have created a Form (enter results) from table results1 and dragged the sub form onto it. I the set both the Link master fields and link Child field to "Class.
When I enter a class in the main form it updates the class field in the subform but does not filter the place options to this class only.

Any assistance would be much appreciated
 
is it possible for you do upload your db?
 
yes
please give advice re how to upload
 
click PostReply button, then on the message click the paperclip icon beside the happy face icon to upload your db, if your db size is more than 2mb, try compressing it using Zip utility, upload the zip file.
 
hello again, which button on your menu will i work on.
 
Many thanks thats great except when a position is selected it stores the class number rather than the position in the "Position" field.see attached image
Also could I be cheeky and ask if you could arrange for the value of the prize to be auto entered in the prize field when the position is selected
Thanks in anticipation
 

Attachments

  • Capture.JPG
    Capture.JPG
    17.9 KB · Views: 90
Thanks that's the position sorted
However the prize value in this case should be £1.50, £1.00 and £0.50 respectively for first, second and 3rd.
As you will see from the screen shot this is not the case.
I am very appreciative of your assistance and patience
 

Attachments

  • Capture.JPG
    Capture.JPG
    23.1 KB · Views: 85
Apologies for being a pain but we need to record the entrant number and select it by entering their number rather than the name as shown
 

Attachments

  • Capture.JPG
    Capture.JPG
    19.8 KB · Views: 78
dont you like names to be displayed (make your info more meaningful) instead of numbers, you can investigate your table T_result2, where you are saving your subform. see that it does not save the name but instead numbers. dont worry about the names on your entrant field its just there for display.
 
Yes I agree seeing the name displayed is good.
However the person entering the data receives it in the format
Class Number
Position
Entrants Number (without their name)
 
Hi Thats great.
Is it possible to also select the entrant by inputting their number
 
Thats great
Just a question now. While it all appears to be working fine why does the "position" field store the number 55 in the table regardless of the value (1, 2 or3) entered in the form. Also how will this display when I start building reports
 
try again pls. i made a sample report (report1), see the recordsource.
 

Attachments

Users who are viewing this thread

Back
Top Bottom