?
Solved

Access 2010 VBA Enable Right Click for Form Filter

Posted on 2013-05-16
5
Medium Priority
?
2,224 Views
Last Modified: 2013-05-24
I've developed an access database for a friend; I've attached a stripped down version to focus on the area.  In the past when making access databases, I've like to hide all of the ribbons and database window from the user.  I think it looks a little more professional and sometimes has security reasons (for those who are honest and just like to play around with things they are not supposed to) in doing so.

For this application, however, I need to make the right click available so that the user can filter the database values based on the form.   If you hold shift down while opening the database, which in this case I want to allow, the toolbars and database window appear, you can open the form, and you can right click on the "title" field of the form and filter the data.

If you just double-click the application icon opening the database, the user can not filter the data.  I have a macro in the background shutting down all of the toolbars and the database window.  I have no idea however to skip the functionality to allow the form filter in this process.  

I'm sure this is a fairly easy fix, but 3 days of googling and revising the VBA has not yet been successful.  I realize now that I should have just asked here.
rightclickenabledneeded.accdb
0
Comment
Question by:atljarman
[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
5 Comments
 
LVL 52

Expert Comment

by:Rgonzo1971
ID: 39170861
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 800 total points
ID: 39171466
< In the past when making access databases, I've like to hide all of the ribbons and database window from the user.  I think it looks a little more professional and sometimes has security reasons (for those who are honest and just like to play around with things they are not supposed to) in doing so.
>
The kicker here is that the Access database has to run "inside" the Access environment.
So all of the techniques to "Hide the application Window" have equally complex consequences.

My guess is that when you "Hide" the Access application window, you lose the ability to filter...?

What I do is just:
Minimize the ribbon
Hide the Nave Pane
Disable Full menus

Or why not just create your own filter system and make it part of the form, then this should be a non-issue.
0
 
LVL 75
ID: 39172008
"For this application, however, I need to make the right click available so that the user can filter the database values based on the form. "

In A2010, you have two options (neither satisfactory):
1)  Create your own custom Right Click menu (aka context aka PopUps) via VBA code using the CommandBars collection)

2) Create custom menus (right click, menu & tool bars) in A2003 first - using the Customize Dialog, then Import these into A2010. Custom menus will show up on the Add-Ins Ribbon, and Right Click will show up normally.
I've created 1000's of custom menus/toolbars/popups with the Customize Dialog - soooooo eash.

There is *no* built in tool in A2010 to create Right Click menus OR custom Ribbons for that matter.

This is the de-facto standard tool for creating custom Ribbons:

http://www.ribboncreator2010.de

I have this tool
0
 

Accepted Solution

by:
atljarman earned 0 total points
ID: 39178365
This is the filter form that I created.  I really didn't want to add a ribbon as I wanted to hide the database window from the user during data entry.  

On the filter form, I uppercased both the value entered and the query value.  I also changed the recordsource of the main form to the query string created in VBA (dynamically) based on the values selected/entered by the user.

I've added the example in case others get to this page and they have the same issue.  Thanks for your suggestions.
rightclickenabledneeded.accdb
0
 

Author Closing Comment

by:atljarman
ID: 39193688
Good ideas provided, but a working solution made available in the end so other users can download and repeat for their purposes as needed.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
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