Solved

Access 2010 VBA Enable Right Click for Form Filter

Posted on 2013-05-16
5
2,199 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 51

Expert Comment

by:Rgonzo1971
ID: 39170861
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 200 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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

717 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