Question Graphical front end to Access

DOC666

New member
Local time
Yesterday, 16:18
Joined
Apr 27, 2014
Messages
5
This is very general at the moment.
I would like to put a graphical front end to access. By this I mean a "plan" view drawing of a site showing all the lights.
I was thinking along the lines of making each light a "hot spot" that would be clicked on by the end users and all the relevant data on that light shown and or added to or shown as blown etc.
Could anyone point me in the general direction of tutorials/information etc on the above idea

Regards
Doc666
 
If your objects have x and y coordinates in your data, then you can represent them graphically using controls on a form. Place a pile of hidden controls on a form in design view. Maybe you want to use check boxes for lights, for instance. Then, since every control has a .Left and .Top properties, you can programmatically move the controls to the appropriate coordinates. Obviously you'll need to be able to re-scale those coordinates, and change the offset from the origin, but something like that is totally possible to do.
 
For that matter, it is possible to draw things on a form using line objects, which are standard Access form features. They have a distinct existence of their own i.e. there is such a thing as Line1, Line2, Line3, etc. and EACH ONE can have a click-event associated with it even if it has no data directly associated with it - i.e. no recordsource or rowsource.

Rectangle objects can also be drawn easily, with various background (fill) colors. For that matter, the fill color of a line can also be made to change individually. If you needed curved lines, that is far trickier.

The only thing that could lead to confusion is if you had lines on a diagonal, because those lines are actually part of an invisible rectangle. Therefore, the "hot spot" for clicking is going to be more difficult to manage. Diagonal lines probably should not cross because they would be unlikely to have an obviously pickable area.

If you wanted a specific graphic for some things, you can do an IMAGE control and load it with a tailored bitmap image, though there you would have to build a border around the image control to indicate highlighting/selection. Again, image controls can have click events. And DblClick events, too.

Doing this control-image idea using only lines, rectangles, and images, you don't need to worry about X/Y position on the screen because Access would handle that by itself. It would be another story if you had to use curved lines or some other complex shape.

Now, if you REALLY wanted to get wicked, there is an outside possibility of you using VBA behind the scenes with PowerPoint, which can do funky shapes, but interacting with the shapes is no bed of rose petals, either.
 
You might find ChrisO's drag and drop samples of interest:

http://www.baldyweb.com/ChrisOSamples.htm

I adapted the original in a taxi dispatch application, where labels represent cars and can be moved around on a map background. Double clicking on one can bring up info about it or generate actions related to it.
 

Users who are viewing this thread

Back
Top Bottom