Share via

Access query to assign values automatically based on conditions

Anonymous
2019-10-15T08:15:27+00:00

Good day

I've created a High School Examination Management database. 

I have a table with all the invigilators [Invigilators] and a query that calculates the start times for each invigilation session [Invigilation Time Slots] (Thank you, HansV for your help with that!)

Now I want to create a query that will take my StaffID field in [Invigilators] and assign an invigilator to each timeslot for each session in a new query, based on the current queries results [Invigilation Time Slots].

Conditions:

  1. In my [Invigilators] table I can add dates/times of when a person is not available.
  2. One person may not be used in more than 2 sessions a day.
  3. If a person is on for two sessions on a day, they must be back-to-back. 
  4. All staff must have the same amount of sessions over the examination period.

Current query (Invigilation Time Slots) results:

Is that at all possible? How can I achieve this?

Thank you!

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. HansV 462.6K Reputation points
    2019-10-15T08:55:04+00:00

    I don't think you can do that with a query, it would require extensive VBA coding. I fear it's beyond the scope of the help I can offer. Sorry!

    Was this answer helpful?

    0 comments No comments