Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clickable area on graphic 1

Status
Not open for further replies.

GreenMtns

Technical User
Jul 25, 2008
5
US
Hi
I am new at this and am developing a database to record accidents and their causes. I "think" I would like to place a graphic of a vehicle on a form. I would then place on top of that graphic some rectangles that would have their visible properties set to no. The rectangles would be filled with "backcolor"= Red. The on click event would be Me.Visible = Yes so the rectangle would turn red on top of the base graphic when clicked.
Seems simple to me but apparently not to Access 2003

Am I way off base here?
Thanks
 
Me.Visible = Yes pertains to the FORM not a rectangle. Me![rectanglename].Visible = yes pertains to a rectangle.
 

You cannot "click" on an object when it's visible property is set to NO.
Why not set the Back Style and Border Style properties to "Transparent".
Change them with the On_Click event.


Randy
 
or make a regular button and set it to transparent - you'll be able to click it.

Let them hate - so long as they fear... Lucius Accius
 
GreenMtns . . .

We may be able to help you better if you explain the point of the red squares?

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Well I guess I was thinking that it would give the user a quick visual about the accident and also be able to track the area that a driver is having a problem with with. An example would be right turns or backing.

I am probably going about this wrong and would like any other suggestions you can come up with.
 
Thank you all for your help. I did not know that I needed to name the control if it was not the form. I have not been able to make a rectangle clickable for some reason. Even though there is a click event for the rectangle when not in design mode it will not click. I tried the button with the same result.

So I have designed a graphic with small rectangles at each damage point. Each has a checkbox beside the rectangle. When the checkbox is checked the rectangle turns red, otherwise it is the same as the background color. This seems to work and accomplishes the same thing although with more controls,

Again thank you
 
Creativity. I like it. You could even expand it so that when a user clicks on a spot, it not even turns red, but maybe a note box opens up to type in a description of the problem. Or a textbox to hold an estimated cost. Nice going.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top