The Student Room Group

Scroll to see replies

Reply 40
Does anyone know how i can calculate how many spaces are left for a particular visit to display on a form.

I really dont know how to do this :/

if a person selects visit ID A and the form should automatically display how many spaces are left how should i go about doing this any sort of formula i can add into a calculated field

thanx any advice will be more than helpful :smile:
Reply 41
Original post by tricky4091
I would suggest you do the checking for spaces first. A simple query that counts how many students are on a particular trip gives you the places taken, then subtract from 10 to find the places available.

Assigning a student is a little more difficult. The simplest solution is to just have a list of all student to select. The problem with this is that you could then some one booked onto 2 visits on the 15th. I would create a query that limits your list to those students who have not booked either of the other 2 trips, so if you were booking for Eiffel Tower on 15th exclude those students who have book for the Louvre on the 15th or the Eiffel Tower on the 16th.
It is not perfect as you can try to book a student twice but the primary key stops that actually happening.
Hope this helps.


thankyou
does help
have u done it if u dnt mind canu PM it to me
tanks again
How many activities are tommorow, is it activity 1 or act 1 and act 2?
Reply 43
Original post by Jack22031994

Original post by Jack22031994
How many activities are tommorow, is it activity 1 or act 1 and act 2?


There are guidelines in the exam about how long an activity should take so how far you get depends on
a) how long the session is
b) how long the activity takes you

If the first session is 2 hours then you will probably get through activity 1 and be well into creating the database by the end.
Reply 44
Original post by Kir4nK

Original post by Kir4nK
Does anyone know how i can calculate how many spaces are left for a particular visit to display on a form.

I really dont know how to do this :/

if a person selects visit ID A and the form should automatically display how many spaces are left how should i go about doing this any sort of formula i can add into a calculated field

thanx any advice will be more than helpful :smile:


Setup a query to count how many VisitIDs there are in the table you have that stores the student's choice of visit. Base the form on this query. Then as there are 10 places per visit take this number away from 10. You can either do the taking away in the query or on the form.

Latest

Trending

Trending