We help IT Professionals succeed at work.
Troubleshooting Question

Looking for a way to trigger a MS Access event procedure with a button???

pcalabria
pcalabria asked
on
46 Views
Last Modified: 2020-11-03
I'm looking for a way to trigger an event procedure in MS Access by pressing a button.

The setup is that I have designed a number of computer displays similar to what you might see in a museum.

While viewing the display you can currently use the mouse to click an item on the screen to start the narration.  Clicking the screen fires the onclick event of Access which starts are routine which plays a wav file.

I would like to trigger the event by pressing a button.  This means I have to find a button that I can connect to the PC, and then also find a way to trigger the event.

In reality, the button does not need to talk to Access.  If I had some other TSR program running which was capable of playing a wav file when a button is pressed, that would work too.

Thanks.


Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2015
Distinguished Expert 2018

Commented:
There is a bunch of USB buttons available.
Some of these must come with some software that can trigger an event somehow, or can be monitored for a button-click.

I have no practical experience, though, so I can't recommend what to use.
Dale FyeOwner, Dev-Soln LLC
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2010

Commented:
Just by a monitor that supports touch screen, then place a regular Access command button on the screen.
CERTIFIED EXPERT

Commented:
In reality, the button does not need to talk to Access.  If I had some other TSR program running which was capable of playing a wav file when a button is pressed, that would work too.

You need to be very clear on the above because you sound like your new program has nothing to do with Ms Access, Kindly try to elaborate further on this or attach your sample database for us to understand exactly what you want to achieve.

Regards

Chris


Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:
I think a USB button is the ticket.  Will show up as keyboard input, which you can check for.

Jim.

Author

Commented:

AQA.mp3

Gustav... Jim.. it sure seems like a USB switch should exist but I'm not sure where to look. I'll search google.
Dale... we don't have the budget for new monitors.  We would need ten 7-inch 4x3 touch-screens, but thanks!
Hankwembo... understood.  The attached photos will help you understand the application.

Our company, PC Components Company, is a distributor of electronic components. We sell ICs, Integrated Circuits, Capacitors, Transistors, etc. worldwide.  The parts we sell, our inventory, comes from clients who have surplus electronic components.  We have many competitors.   It doesn't take powerful software to try to seel something on consignment.  My goal is to show clients that 50% of a watermelon is better than 80% of a grape.

To make this point we give them a demonstration of our software which differentiates us. It takes a lot of cpu horse-power to track and evaluate global "supply and demand" of tens of billions of electronic components and conditions need to be updated daily... as soon as we are done we need to start again... the cycle starts over every day as conditions constantly change.

To "show-off" our software to clients who visit our facility we have set up this interactive display. We use ten very fast computers each connected to its own monitor to explain a different aspect of the business. Each runs every day and is capable of running, 24/7 to give us a competitive advantage.

Few people understand our competitive advantage until they see our software in action. I'm sure most experts reading this are already thinking there is a better way to do what we are doing.  The truth is that cpu's, hard drives, networks, and internet speeds all provide performance limitations.  We need to track our competitor's inventory, generate competitive prices based upon supply and demand in the relevant region, create search engine friendly descriptions and internet listings to advertise and update advertisements of components, create SEO website listings update other Internet, interact with e-commerce modules, respond to RFQs, generate quotes, and much more, all in as close to real-time as possible.

Currently, there is a mouse under each monitor. A click on the screen starts a 1-2 minute dialog that explains the purpose of each module.  A large button next to each keyboard would be a better solution.

The bottom line is this display is designed to show companies who have excess inventory of electronic components why they will get a higher return when they select PC Components Company, also known as PCC (https://pccomponents.com) why they will get higher returns when they consign their inventory to our company.  

I hope that explains.  I'll try to attach one of the voice snippets.
AQA.wav 
John TsioumprisIT Supervisor
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Another .... crazy idea .... you could buy a barcode scanner that is set to scan whenever a barcode is "presented"  to the system (like super market)..the customers before entering the room would get some kind of a ticket (it could be just fake barcode just to trigger the event) ..."show" it to the scanner....the scanner will be "targetting" to a text box ...prest ...event triggered.

Author

Commented:
Creative John.. but really want a button.

The best idea that I've come up with is to give a control the focus and then tear apart a mouse.... but putting a mouse inside a box with a switch rewired in parallel is a bit further than I want to go with this.

Still need a more practical idea! :-)

 
Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:
<<The best idea that I've come up with is to give a control the focus and then tear apart a mouse.... but putting a mouse inside a box with a switch rewired in parallel is a bit further than I want to go with this. >>

 That's a USB button....

Jim.
Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:
they come in all shape and sizes:

https://www.compuphase.com/usbkey/usbbutton_en.htm

 and can be wired or wireless.

Jim.
CERTIFIED EXPERT
Most Valuable Expert 2015
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
Thanks Jim... unfortunately they are $150 each with the VAT tax and not in stock... so ten of them are out of budget.. but that would be an excellent solution.

Gustav.. Yep, that was my backup plan if no one here has any better suggestions. I've thought about modifying staples Easy Buttons

Jim's suggestion led me to this.. I"m not sure I'll use it because of the foot.
https://www.amazon.com/gp/product/B01NAL3DV6/ref=crt_ewc_img_oth_1?ie=UTF8&psc=1&smid=A2VDCJH6QLAPQL

Any other suggestions?  I'm wondering whether there is another group or forum to share this with??


John TsioumprisIT Supervisor
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:
@Pat,

<<Thanks Jim... unfortunately they are $150 each with the VAT tax and not in stock... so ten of them are out of budget.. but that would be an excellent solution. >>

There is no problem with the solution that gustav proposed.  It will do exactly what you want.  At this point it's simply a matter of doing a little shopping and getting a price you want.

 If you want it cheap, get it direct from china.  Here you can order 10 pieces at $2 each:

https://www.alibaba.com/product-detail/USB-button-Web-Key-Programmable-Webkey_60644825736.html?spm=a2700.7724857.normalList.1.31033610vzEXCE&s=p&fullFirstScreen=true

 It's not fully programmable, but that doesn't matter.  You can have them program some unique key combination and then just look for that.

 Here's a Staples sized button, which is programmable:

https://www.alibaba.com/product-detail/Programmable-usb-button-staple-button_60698483161.html?spm=a2700.7724857.normalList.118.28b93610GoHSCR

 I found these here:

https://www.alibaba.com/showroom/usb-button_1.html

<<Gustav.. Yep, that was my backup plan if no one here has any better suggestions. I've thought about modifying staples Easy Buttons >>

 There's that too.   Within a few minutes of searching, I found a posts that did just that:

 https://www.instructables.com/USB-Easy-Button/

or

https://www.instructables.com/Make-a-Staples-Easy-Button-tm-Control-your-compu/

 But now you are getting in the $40-50 range per button.   If you want it cheap, but it from China.

 So with all that said, I see no reason not to close out the question at this point and give gustav the solution. You just need to do some shopping and come up with something for a price that you are willing to pay.

Jim.

Author

Commented:
Thanks all...

I'm still not sure which solution I will use.  

Most of the inexpensive USB buttons are designed to send a sequence of keystrokes to open a browser and website... or to download sound files from the computer to play on their tine speaker that is muffled by the table...

A few suggestions from Gustave and Jim have possibilities that I will explore.

Thanks again..  

I really wish there was an On Right-Click option in MS Access!  That would be another solution.. not as glamorous as a button but effective.
Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:
<<I really wish there was an On Right-Click option in MS Access!  >>

You use the MouseDown event:

https://docs.microsoft.com/en-us/office/vba/api/access.form.mousedown

Jim.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions