Results 1 to 11 of 11
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919

    Design View mas confusion

    I have a new app that deals with rooms depicted in a pictorial layout of a high-rise tower. There are two different towers with dramatically different floor plans. The functional logic that applies to each of the image controls of the individual rooms will be the same regardless of which tower their in, hence the VBA event code subservient to the room image controls will be identical. While the visibility of the image controls can be toggled as needed for the different towers, the user being non-the-wiser, the design view of a single form hosting multiple towers becomes a visual nightmare.

    A simple approach is to have a different form for each tower, but the duplication of event code is highly undesirable, bad practice. Is the only way to avoid this mess is to have a general module provide the event processing referencing controls of a given tower form within the Forms Collection? Perhaps overlapping sub-form containers where the visibility of the containers can be toggled depending on the tower? Option groups don't apply since I'm dealing with image controls and overlapping groups would still be a design view mess.

    Any thoughts before I jump off into the abyss?



  2. #2
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    One approach could be separate forms and all controlling code in a module. Calling code might be just one line. What you need to pass to the module code I have no idea. Rather than having to pass a whole lot of arguments to the controlling function(s) you might just pass the form itself. If there are too many controls on one form to be manageable in design view, it makes sense to have separate forms. Having said that, if you aptly name your controls (and they are all on one form) you can access them via the control list drop down. You don't have to find the actual control somewhere on the form, hidden behind something else.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Thanks, my thinking has arrived at the module approach much like you describe. I'm going to leave the OP open until development progresses to where it's clear if the number of arguments dictates if the "tower forms" themselves need to be passed. I need to remain insightful of what desires might still come from the users.............. you know how they can be sometimes

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Sorry Bill but I don't get why the design of the form would be so much different for a different dataset? I booked many different houses on AirBnB or HomeAway and the pictures were all different (sometimes they were the same but that's another story ) , but sure the interface didn't change. Can you maybe show us a couple of screen-shots of what you are dealing with?

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #5
    accesstos's Avatar
    accesstos is offline Expert
    Windows XP Access 2007
    Join Date
    Dec 2018
    Location
    Greece
    Posts
    551
    I'm not sure if I understood correctly but, I have to say that,
    the tab controls often simplify and organize forms with a lot of controls at a very good level. If you want, you can set the style of tab to None.

    Also, the classes multiplies the functionality of an object, which lives in multiple instances at the run time, without any bound other than the system memory.

    Finaly, in the most of the cases, is better to manage the source of a single object in a form (image, subform etc) instead of the visibility of multiple same objects.

    Could you provide some screen shots of the "messy" forms or a sample db?

  6. #6
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Sure, here are just two. In your "minds-eye", superimpose 3 or 4 of these with image controls wrapped around each of the rooms in design view all created on a single form. I think Micron's idea might help what's left of my sanity...........
    Click image for larger version. 

Name:	000.jpg 
Views:	25 
Size:	73.6 KB 
ID:	44516Click image for larger version. 

Name:	001.jpg 
Views:	24 
Size:	62.2 KB 
ID:	44518

  7. #7
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Are you saying you want to use these pics as the form's background and superimpose image controls on each room show on th epic? Why would you do that and not provide a combo with the room numbers and one image control that displays the selected room?
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  8. #8
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    No. The screenshots were simply to show you the variation in the floor layouts. I'll only use them to aide in placement of the image controls.

  9. #9
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Same thing Bill with or without the pics as the background you are trying to design a form to match you data. I have never seen an app with the interface matching the shape of the whatever they sell. It can make for some interesting programming but surely you will run into issues with screen size\resolution, etc. Why not stick with a more "classical" approach of showing the floor plan in one image control and offering the user a list or rooms (list or combo) to select the unit they want to see in a second image control. And it will still work for the next 20 towers....
    Just my two cents...
    Cheers,
    Vlad
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  10. #10
    accesstos's Avatar
    accesstos is offline Expert
    Windows XP Access 2007
    Join Date
    Dec 2018
    Location
    Greece
    Posts
    551
    Quote Originally Posted by GraeagleBill View Post
    No. The screenshots were simply to show you the variation in the floor layouts. I'll only use them to aide in placement of the image controls.
    Hmm... interesting, you attempt to make something like the <map> element in HTML5.
    https://www.w3schools.com/html/html_images_imagemap.asp

    I think that is not impossible in Access but is a little a bit tricky (of course, without overlapping images).

    Using the actual dimensions of the drawing of the floor, transformed by the dimensions of the image displayed, perhaps you will be able to query the number of each room through the arguments of events like MouseMove, Click etc.
    For example, something like that:
    Code:
    Select Top 1 roomID From qryThisFloorRooms WHERE (roomX < mouseX)  AND (roomY < mouseY) ORDER BY roomX DESC, roomY DESC;
    Then, do anything with the roomID.

    Just a thought, too.

    Cheers,
    John

  11. #11
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Sorry to be so long in closing out the OP, I had to wait until everything worked successfully. The resulting app uses a single form for all floors with a very small amount of OnLoad code to make small visibility adjustments as the app moves from floor to floor.

    Thanks everyone for your thoughts,
    Bill - a.k.a. "The Old Geezer"

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

Similar Threads

  1. Replies: 10
    Last Post: 02-06-2018, 02:37 PM
  2. Table Design Confusion
    By drunkenneo in forum Database Design
    Replies: 2
    Last Post: 09-30-2014, 11:08 PM
  3. Replies: 6
    Last Post: 05-09-2014, 09:03 AM
  4. New design and frozen by confusion
    By grussell in forum Access
    Replies: 7
    Last Post: 09-03-2013, 12:32 PM
  5. Replies: 17
    Last Post: 11-13-2012, 03:28 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