Results 1 to 6 of 6
  1. #1
    ItsRoland is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jun 2018
    Posts
    111

    Buttons and Images Get Larger in Form View?

    I set up a few images, two labels, and a button on one of my forms. All these do is display information depending on what device is being referred to. I wanted to have the same display on a few different forms not only for ease of use, but for consistency's sake as well.



    I copied these objects over to the first form I was placing them on, moved some things around so it would fit, and started checking how it would look before adding any code. Note that there is 100% 0 code on this form that interacts with these objects whatsoever. Rather than explain whats happening, its much easier to just show you..

    Design View (as it should look). The picture of the question mark has multiple images underneath it which become visible / not visible as needed. These images, as well as the 2 labels and button to the right of it, are the issue.



    Click image for larger version. 

Name:	weird form behavior - design view.PNG 
Views:	7 
Size:	24.2 KB 
ID:	35354






    Form View (This is where it gets messed up). As you can see, one of the images (or maybe more underneath that image) and the button grow in size. I cannot for the life of me imagine why. On their original form there are no issues like this. It should also be noted that the original form does not mess with the size of the objects, so its not a case of them being that large to begin with and then being shrunk down. They should stay the same size they are in design view.



    Click image for larger version. 

Name:	weird form behavior - Form View.PNG 
Views:	7 
Size:	62.6 KB 
ID:	35355



    Any help is greatly appreciated! If history repeats itself, I'm probably just overlooking something simple again lol. Thanks in advance.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    the photo box has settings:
    zoom,
    stretch,
    clip.

    Stretch will fit the image into the box size.

  3. #3
    ItsRoland is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jun 2018
    Posts
    111
    Right, but the boxes are all the same size, that size being the one you see in the design view picture.

    Just in case, I selected all the pictures and resized them. The issue persisted.

    Also, if that were the issue, then the command button wouldn't be stretching as well.

  4. #4
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,157
    Check you haven't got any "Placeholders" associated with the new controls.

    Later versions of access seem to like grouping controls and also placing holders around objects, which can behave oddly.
    Click around them to see if you can select the invisible "helpful" accessories.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  5. #5
    ItsRoland is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jun 2018
    Posts
    111
    I don't think that's the case. I clicked all over the place around the controls, even moved them to opposite corners of the form and continued checking, and nothing changed.

    If there's a more effective method of checking for this let me know, otherwise I'm fairly confident this isn't the case here.


    I also manually set the Height/Width values for the controls in question in the code, both in the Opening events of the form, and tied to a button. The issue persisted upon opening the form, and clicking the button caused the controls the flicker for a second, but no changes were apparent.

    Update: after opening the form in design view a few times after the above testing, the command button in question had shrunk to a small size (I set it to be very small in the code to ensure I wasn't setting the height/width values to be just as large without meaning to). I'm unsure why this change was only reflected after multiple shifts from form to design view, but it leads me to believe that the changes are taking place, but something else is overriding them, if that makes sense. Hopefully this information helps.

  6. #6
    ItsRoland is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jun 2018
    Posts
    111
    By sheer luck, I figured out what was causing the issue.

    For some reason when I make the form window larger/smaller these controls change sized along with it. i.e. if I make the form window wider, some of the controls stretch the same amount.

    This may be because earlier I was messing around with having my forms maintain their aspect ratio when on different sized displays (aspect ratio might not be the right word). I can't remember what that property is called for the life of me, so if someone could jog my memory so I can turn it off and test, that would be appreciated. In the meantime I'll do some digging to see if I can find it myself and post an update.

    Update: The property I was looking for is the "FitToScreen" property. I tested this with that property set to "no", but the issue was still occurring, so it would seem this is not the case like I suspected. The weird part is that not all controls behave this way. Lines would warp, only some buttons would stretch, and only some images stretch. If anyone knows why this is happening, please let me know.

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. Replies: 6
    Last Post: 05-09-2014, 09:03 AM
  3. Replies: 2
    Last Post: 03-09-2014, 03:21 PM
  4. Command buttons & images displayed on a form
    By crowegreg in forum Programming
    Replies: 2
    Last Post: 10-15-2013, 09:34 AM
  5. How to view images in a database.
    By Samari in forum Access
    Replies: 1
    Last Post: 04-03-2012, 06: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