Filtering via Check Boxes

Davrini

Registered User.
Local time
Today, 09:11
Joined
Aug 12, 2012
Messages
29
Hi Guys!

Having a bit of a problem trying to figure out how to do this :/

Currently I'm amending a database I have built that over the last few weeks has gotten more complicated that I had originally envisioned, but isn't that always the case :rolleyes:

I'm building a database for a Counselling Clinic that operates 5 days a week, with 9 different appointment times. Each Counsellor only works one shift pattern, and that is their regular work pattern. The times are split into 3 groups: Morning (9am>12:30pm), Afternoon (1pm>4:30pm) and Evening (5:30pm>8:30pm).

databasetime.PNG

Each Counsellor works one of these groups, as per the picture below.

databasetime3.PNG

What I am trying to accomplish is a query that knows to only show the times that the Counsellor is in on for their Appointments. That way, when the Counsellor's name is selected, their appointment diary only shows that they have 3 available slots because those are the only slots that they work. I want this to work like this because it appears in a List on the Appointment Page. How would I filter this:

databasetime2.PNG

To only show either the Morning, Afternoon or Evening times? The odd thing is, I've figured out how to filter it by day, but can't seem to filter it by time :banghead:

Access '07/'10.
 
Hi,

Its not that tricky. You need to use subqueries and DLOOKUP

so you will have the following, using Josephine. I have called your schedule table tbl_Schedule.

iif(DLOOKUP([Morning],[tbl_Schedule],"[First Name]='Josephine'")=1,(Select [Time] from [tbl_Diary_Time] where [Morning]=TRUE),iif(DLOOKUP([Afternoon],[tbl_Schedule],"[First Name]='Josephine'")=1,(Select [Time] from [tbl_Diary_Time] where [Afternoon]=TRUE),iif(DLOOKUP([Evening],[tbl_Schedule],"[First Name]='Josephine'")=1,(Select [Time] from [tbl_Diary_Time] where [Evening]=TRUE))))

I havent tested this, so it may need some tweaking, but the idea is how to do it. I have just done for a Nurse Bank you see :)

Thanks
 

Users who are viewing this thread

Back
Top Bottom