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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clickable Map Form 1

Status
Not open for further replies.

p27br

Programmer
Aug 13, 2001
516
GB
Hello

For the project I'm going to do, I would like to have a form that displays a map (not a country map but more like an architects plan) whose parts can react to clicks. Maybe one of you can put me on the path, or tell me if it's possible in Access.

thanks for any ideas.
 
Hi,
If you want the user click the area and go to another form (Open a new form)is possible.

Use Insert menu when you are in the Form Design view and insert "hyperlink". Normally it is inserted on the upper left hand corner of the form. Drag it to the spcified area and resize it.

The Picture must be pasted on the form. Location of the link will be changing from PC to PC if the picture is used as a background picture of a form.
I think this will help you.. Or post back...
Regards

Zameer Abdulla

 
thanks

I'll try the hyperlink idea, if I insert an image can I define zones inside it that would trigger the form with differnet data ?
 
This may lack elegance but it is possible to capture an image, place it on a form and then place transparent buttons that can be clicked on top of it.
 
thank you both for these hints, I'll go try it.

regards
Paul
 
If you have an image you want on the form, I believe you can use labels in the same way, placing them at the proper places on your diagram or picture. Set the diagram or picture to the back, so that the labels show to the front.

Joe
 
JoeCruse is correct. Labels can be placed on top of any image, such as a map, and with no caption, no borders, and transparent background, you can't see the labels. However, if click on the lable, the label's click event is fired, and you can process accordingly, just as if it were a command button.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
zameer

that what I thought. When you create a label, you need to write in it otherwise it dissapears.
but it would be a neat solution for me.
 
That's a valid in using the hyperlink.

With respect to the label, yes, you can have a label with no caption. It's a little more effort because you have to assign a caption when adding the label. But once the label has been added, you can go back to the Label properties and remove the caption.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
I have not tried it yet, but it seems plausible that if the labels can be done in this fashion, and they can, then so can a picture or a diagram that is added to a form. Depending on how your map is set up, is it possible to break it up into sections, using some photo editor program, and save each section as a separate bitmap? You could then add each one to your form, position them as you wish, and then use the "On Click" event to perform a reaction when clicked.
I may try this on something myself, as it sounds useable, if work intensive to set up.

Joe
 
I don't think you'd need to break the bitmap up. Add the bitmap to the form as is, and then size and position as many labels as you need to cover all of the "hot" areas of the bitmap, and then you know where on the image the click occurred based on which label's click event was fired.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
CajunCenturion,

you're right, I think, but I only mentioned actually using the pieces of one bitmap because it looks like p27br is looking at doing this with something more along the lines of an architect drawing. If text on the pictures is okay or desirable for the users, I'd definitely go the route of using labels. But if the users only want a picture on the form, with no test at all, breaking up the original picture into multiple bitmaps might become a good option. A lot of that depends on how organized the original picture or drawing is though. If it does not lend to breaking up into organized pieces, it would definitely be easier to use the labels. Especially the idea of using blank labels, when no text is desired.
On second thought, you're even more right. Just use blank labels, and size them to fit as closely to the desired "cover area" as possible, for clicking on.

Hmmm...I'd like to try to do that sometime, it sounds interesting to try.

Joe
 
first of all, thanks for all your valuable input, I didn't expect such enthusiasm.
In fact what I have in mind is a yacht club marina plan, where you can click on each boat symbol separately to manage berth reservations. I am not asking for a detailed solution because I'd like to try and work it out myself and consult you guys from time to time when I run into a problem.
I was thinking about using a tiny yacht formed image for each occupied berth. Also the facilities symbols could be clickable to open billing module, ...
 
Just an idea but can you not place you image of the marina plan on the form and then over the top of that place the images of the yachts. You can then have an OnClick event on each yacht that would open up the desired form.
 
yes that's what I had in mind
I'll get to work over the holidays and keep you posted

again thanks to everyone for their ideas and Happy Christmas !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top