Go Back   Access World Forums > Microsoft Access Discussion > Tables

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 10-09-2019, 05:27 PM   #1
InFlight
User
 
Join Date: Jun 2015
Location: Masterton, New Zealand
Posts: 100
Thanks: 37
Thanked 0 Times in 0 Posts
InFlight is on a distinguished road
Question Me.WindowWidth

Hi

I am trying to resize a form, but Me.WindowWidth but gives me a negative number on a 28 inch screen but it is ok on my 17 inch laptop

i am using Abs(Me.WindowWidth) as a fix but only use's 3/4 of the screen
Using access 2010

Does any one know why.


InFlight is offline   Reply With Quote
Old 10-09-2019, 05:39 PM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 4,566
Thanks: 50
Thanked 1,047 Times in 1,028 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Me.WindowWidth

Hi. Are you, by any chance, hiding the Access window/shell?
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 10-09-2019, 07:41 PM   #3
The_Doc_Man
Happy Retired Curmudgeon
 
Join Date: Feb 2001
Location: Suburban New Orleans, LA, USA
Posts: 14,350
Thanks: 87
Thanked 1,642 Times in 1,524 Posts
The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold
Re: Me.WindowWidth

Please check this link: https://support.office.com/en-us/art...8-98c1025bb47c

You will find that the maximum width for a form is 22.75 inches. You are going to 28 inches.

I think the techie reason is that screen widths get computed in twips (1440/inch) and if you do the math, 28 inches is over 40,000 twips. To get a negative number means that the form's width is probably stored as a 16-bit quantity and your 28 inch width overflowed (i.e. the sign bit got overwritten by a numeric bit). If you do the math, you see that 22.75 inches x 1440 twips/inch = 32760 twips, just under 32767, the highest legal integer in a 16-bit signed integer.

You said that you only use about 3/4 of the width. Well, 3/4 of 28 inches is 21 inches, just under the 22.75 limit. Pretty close.

__________________
I'm a certified grandpa (3 times now) and proud of it.
Retired over one year and survived being home all day with the wife. She must really love me.
If I have helped you, please either click the thanks or click the scales.
The_Doc_Man is offline   Reply With Quote
The Following User Says Thank You to The_Doc_Man For This Useful Post:
InFlight (10-10-2019)
Old 10-09-2019, 11:16 PM   #4
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 10,350
Thanks: 112
Thanked 2,841 Times in 2,591 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Me.WindowWidth

For info, I had exactly the same issue with the total number of pages on a monster report. Where the [Pages] expression exceeds the long integer limit of 32767 it goes negative. See http://www.mendipdatasystems.co.uk/n...ges/4594515908
In that case I was able to adapt the calculation (with assistance from jdraw) so it always read correctly.
However the maximum limit of 22.75 inches (approx. 32767 twips) for form and report widths is cast in stone. Similarly the maximum height of each section
Nor can you use AFR to go beyond the 22.75 inches limits.

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
The Following User Says Thank You to isladogs For This Useful Post:
InFlight (10-10-2019)
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] windowHeight WindowWidth ECEK Forms 1 08-17-2018 01:31 AM




All times are GMT -8. The time now is 12:04 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World