Results 1 to 3 of 3
  1. #1
    ljpitre is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Nov 2018
    Posts
    4

    .WindowWidth goes negative when it exceeds 32600

    MS Access 2013, some of our users now have 30" inch monitors. Therefore with the maximum 22" access control width I have to rework the resize function.
    However, when the .WindowWidth exceeds 32600, it goes negative.


    can anyone explain this and how to get around it?
    thanks

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    Some conjecture follows ....

    I believe its because the screen dimensions use an integer datatype which has limits -32,768 to 32,767
    So when you reach 32767 it goes negative

    I believe the maximum form width or section height of 22.75 inches is for the same reason
    There are 1440 twips per inch and 22.75*1440 = 32760 which is effectively the integer limit

    So to increase those limits, MS would need to do some fundamental structural changes to use long integer instead
    If so, the mind boggles on how large the form & report limits would become

    That doesn't explain why the maximum height of all sections of a report is 200 inches ...but as always Access works in mysterious ways
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    it is because it is an integer - maximum value 32767. There are 1440 twips per inch, so 32767/1440=22.75 inches. Don't confuse form width with window width. A 10" wide form can be displayed in a 30" wide window - it will be displayed top left of the window with everything to the right taking the back colour of the relevant section. A 20" wide form displayed in a 10" wide window would provide a scrollbar for users to navigate left to right.

    The only way round it would be by having two or more forms being managed side by side with VBA. This could be done in the access window (you can hide most things like navigation window/ribbons etc) or by using popup forms.

    Edit: Also for postioning controls you should really use insidewidth rather that windowwidth to take account the thickness of the window border and scrollbars

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

Similar Threads

  1. Using the (000.00) for a negative number
    By keiath in forum Forms
    Replies: 4
    Last Post: 01-10-2015, 04:43 PM
  2. Query exceeds 1,024 character limit
    By EddieN1 in forum Queries
    Replies: 2
    Last Post: 05-20-2013, 08:11 AM
  3. Positive to Negative
    By greek-autumn in forum Queries
    Replies: 3
    Last Post: 03-24-2013, 05:20 PM
  4. Replies: 3
    Last Post: 11-13-2011, 10:20 PM
  5. Oracle table name exceeds 30 char?
    By workindan in forum Access
    Replies: 0
    Last Post: 12-08-2010, 02:59 PM

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