Image Click event

zeidhaddad

New Member
Joined
Oct 4, 2019
Messages
14
Hello People, I'm trying to figure out a code which perform this : clicking on a image to open a certain form.
I tried using this DoCmd.OpenForm "NameOfForm", , , "Image1=" & Image
where Image 1 is the name of the image that i want to click on to open the form. any ideas ?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hello,

Just right click and select Assign a macro ...

Hope this will help
 
Upvote 0
Just right click and select Assign a macro ...
That sounds like an Excel solution, not an Access one (this is posted in the Access forum).
Just to make sure, I tried it in Access, and don't see that option.

I think what you need to do is to select the image, right-click, select Properties, go to the Event tab, and kick off the Code Builder on the "On Click" event.
 
Upvote 0
Sorry for the confusion ... :oops:

Thought it was an Excel related question ...
 
Upvote 0
Thought it was an Excel related question ...
I am guessing that you were working from the "Zero Rreply Posts" list and didn't notice the forum listed in the right-most column.;)
It happens from time-to-time!
 
Upvote 0
I am guessing that you were working from the "Zero Rreply Posts" list and didn't notice the forum listed in the right-most column.;)
It happens from time-to-time!


Spot on ... !!! :smile:
 
Upvote 0
It looks to me as if you're trying to pass an image name as the parameter for the Where condition. That will never work because it expects a sql statement that is a valid Where clause (without the word Where). I don't see where the image name that you're clicking on has anything to do with the form you want to open? Why not just DoCmd.OpenForm "NameOfForm" ?
 
Upvote 0

Forum statistics

Threads
1,224,744
Messages
6,180,696
Members
452,994
Latest member
Janick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top