Results 1 to 7 of 7
  1. #1
    mike_art03a is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Oct 2011
    Location
    Gatineau, QC, Canada
    Posts
    2

    Have an interesting image display question.

    Howdy all, first time on these forums and I figured I may as well ask away. I've searched all over for a similar solution (including the forums before I posted), but I can't seem to find it. So here hopes someone might have the answer I've been searching for, makes 3 weeks that I can't find something.



    I'm fairly proficient with access in most respects when it comes to forms (as well as reports) design, query building, table structure and relationships. However, I (for the life of me) cannot code worth squat in VBA (used to be able to back in high school, but not now).

    I'm developing a database that contains directory information for the building I work in. I'm a security guard/front desk attendant and while the client does provide us with access to their global Outlook/Exchange address list, it's not exactly what one would call 'user-friendly' or up to date. We have some guards that aren't exactly computer gurus and they really hate having to dig up contact details for info. Not to mention the exchange servers tend to die frequently for some reason lately.

    So, I and a fellow co-worker decided to work on a database that would contain all the current information necessary to be able to contact people as well as be able to locate their office in the 14-storey building that we occupy. He's already laid out the necessary table structure and data needed. While he's good getting the data laid out, he's not that great for GUI design, but I am due to going to college for graphic design.

    Now here's our predicament. What we would like to do is to be able to display the floor plan along with an indicator on the screen as where a person's office is based on the floor indicator and office number in the record info (which will most likely be a set of x,y co-ordinates).

    Now that being said, the images have to be stored in the database due portability requirements (as this database will be stored on 2 computers as we don't have a common network share available for the staff to use). I know it's a big no no, but I have to live in the means of what we're provided.

    Here's a few things to keep in mind:

    • We're stuck using a standard Access 2003 installation, so ActiveX controls that aren't part of the standard Access installation are forbidden due to network security requirements.
    • I'm not afraid of having to build new tables, queries, etc. in order to accomplish this goal.
    • Don't be afraid to get technical if you have to, I have an IT background despite my attending design classes. (Major in Graphic Design, Minor in IT Support)

    If anyone can lend me a hand, I'd appreciate it. I only have one table at the moment with the directory information, I haven't built the table to contain the images yet. Here's the basic breakdown of the Directory table, I know that the field names could be changed to something more usable, but I don't want to alter this table too much as the data is imported from an Excel spreadsheet that's sent to us when people move around, hired, etc.

    tblDirectory
    Code:
    Field Name|Data Type|Comment
    ID|AutoNumber|
    Room|Text|Room numbers are stored as text due to some rooms having a letter appended to the number (ex. 1102a)
    Flr|Number|Floor Number
    Surname|Text|
    Initials|Text|Initials or first name where available.
    Rank|Text|Building has some Military personnel in it.
    Phone|Text|Stored as text due to input mask involved as well as extensions.
    Group/Wing/Formation|Text|Primary Group (due to military personnel in building).
    Division/Unit/Ship|Text|Second level of command organization.
    Section/Sub-Unit|Text|
    Position|Text|
    If anyone can take a crack at this for me, I'd appreciate it. There's no deadline as this is completely voluntarily on my and my co-worker's end. We're just doing this to help streamline some of the workflow.

  2. #2
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    481
    You have images for each floor and can create a table containing x-y coordinates for each contact. First thought that comes to mind is to create 14 (number of floors) forms which have the basic floor plan as the background of the form. One of the fields on the form is the pointer. It's location is set when the form is loaded by a VB routine which simply changes the field's top and left properties (the other properties can be set when the form is designed).

  3. #3
    CraigDolphin is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Apr 2009
    Location
    Custer, WA, USA
    Posts
    125
    To refine hertfordkc's idea, assuming you name each flooplan jpg using a predicatbale convention based on the floor number, you could use just one form and set the background image picture property to the path of the correct jpg using the relevant floor number stored in the contacts table.

    I'd use the on_current event of the form to do something like:
    Code:
    If Nz(Me.FloorNumber,0) > 0 then
      'A floor number is present so use that same-named jpg stored in a subfolder called 'FloorPlanFolder'
      Me.Img54.Picture = CurrentProject.Path & "\FloorPlanFolder\" & Me.FloorNumber & ".jpg"
    Else
      'there's no floor number stored! load up a error image instead!
      Me.Img54.Picture = CurrentProject.Path & "\FloorPlanFolder\MissingFloorImage.jpg"
    End If

  4. #4
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    481

    Refresh

    After you change the properties, you may have to do a "Refresh" to get the image to paint with the desired settings.

  5. #5
    Max D's Avatar
    Max D is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2009
    Posts
    63
    To go further, you can create table with floor images (14 images wouldn't make your database too big), and table with floor numbers,room numbers and corresponding x-y coordinates.

    Then you can use this data to build the picture - get proper floor image and move some control (i. e. empty button) to the given coordinates - as a marker.

  6. #6
    mike_art03a is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Oct 2011
    Location
    Gatineau, QC, Canada
    Posts
    2
    Thanks for some of the ideas guys, but that still doesn't really tell me how I can get these things to line up and work properly. Working with an xy grid is no issue, but it's getting things to appear properly. The floors sadly don't have same layout for each (hence my idea of an xy grid system).

    Max, I think you may be onto something. However, I'll reiterate that I have zero coding experience. I've always made use of Access's command button creator, so moving something to indicate a location is beyond me.

  7. #7
    apr pillai's Avatar
    apr pillai is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Alappuzha, India
    Posts
    209
    In a database Application handling graphics have limitations. One thing that crossed into my mind is placing labels on appropriate places (with their visible property set to No, addressable with co-ordinates data, i.e. the label names must be formed with the co-ordinate values based on their placement) and make them visible with flashing text (Animating Label on Search success) based on the User's selection.

    Sample label addressing method: Wave-shaped reminder ticker

    Floor-Plan can be loaded as Form's back-ground image and place labels at co-ordinates locations.

    In any case you need vba to move things as complex as this.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Image display in reports from external file
    By lumoco in forum Reports
    Replies: 2
    Last Post: 09-28-2011, 04:37 PM
  2. Display image based on combobox selection?
    By 10 Gauge in forum Forms
    Replies: 2
    Last Post: 09-15-2011, 07:42 AM
  3. Interesting and Urgent Join Query Question
    By pinecrest515 in forum Queries
    Replies: 8
    Last Post: 01-26-2011, 11:21 AM
  4. Replies: 0
    Last Post: 12-03-2010, 02:17 PM
  5. Access Relationship Display Question
    By dayrinni in forum Access
    Replies: 3
    Last Post: 02-05-2006, 11:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums