Link to home
Create AccountLog in
Avatar of Karl_mark
Karl_mark

asked on

Adding Run Query to Context Menu Access 2010

I have a form in Access 2010 which is used for Timetable planning in a college. When assigning teaching staff to a particular slot it is useful for the planner to know how many periods that member of staff is already assigned to.
I've written a query which will list members of staff and the number of periods which they are teaching, but I would like for the user to be able to right click on a period and run the query filtered by the member of staff in the relevant period. For example, RDR is teaching a Maths class in period 1, so his initials are in the text box for period 1. The user right clicks on the period 1 text box, and selects "Query teacher" and this opens the query filtered for RDR.

How easy is this to do?
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Right click menus are more difficult to create.

Why not just run this by clicking a button? (Much simpler)
or simpler, display the results in a popup form in a listbox (to disallow edits)
Avatar of Karl_mark
Karl_mark

ASKER

I've done that bit. It would just be nice to be able to right click and open the query!
Then something like this should work in the most basic sense
Database107.mdb
ooops, you wanted the right click...
...as I stated, these are trickier to make in Access 2010...

Let's see if another expert chimes in...
ASKER CERTIFIED SOLUTION
Avatar of Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks. Looks like it does the job and I can work it out!