?
Solved

Adding Run Query to Context Menu Access 2010

Posted on 2013-05-16
7
Medium Priority
?
428 Views
Last Modified: 2013-05-17
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?
0
Comment
Question by:Karl_mark
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39171571
Right click menus are more difficult to create.

Why not just run this by clicking a button? (Much simpler)
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39171579
or simpler, display the results in a popup form in a listbox (to disallow edits)
0
 

Author Comment

by:Karl_mark
ID: 39171580
I've done that bit. It would just be nice to be able to right click and open the query!
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39171620
Then something like this should work in the most basic sense
Database107.mdb
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39171629
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...
0
 
LVL 21

Accepted Solution

by:
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 2000 total points
ID: 39173424
You can use VBA code to do what you want.

Attached is an example in 2003 format that will work in 2007 and later. It will show you how to do what you want.
ShortcutDemoForPosting-A2003.zip
0
 

Author Closing Comment

by:Karl_mark
ID: 39173917
Thanks. Looks like it does the job and I can work it out!
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question