Me.Visible = False is Not Working Correctly

Glad to see you've almost got what you want!

I'm guessing but here's a possible reason that MAY account for your effect
When you enter form widths, height in the property sheet, you may notice that these are often modified slightly by Access
e.g. 8.255 cm => 8.256 cm; (rounded) and 8.256cm => 8.257cm (again rounded)

I believe the changes are made to ensure the result is a whole number of twips for rendering purposes
I realise you are using inches but the principle is the same

Perhaps Access is applying similar 'rounding changes' to the Top & Left values?

Once again, can I recommend you review my article Move Forms & Controls - Mendip Data Systems which discusses the various units involved in form displays: twips, pixels & points
 
Last edited:
Just as a gotcha with forms and set focus, which I don't think has been mentioned, you can't set focus to a form if it has any controls on it. The Form itself can't receive focus, a control on it has to be referenced.
 
@Minty - That may have been the issue. I may try that on the demo DB I posted in this thread to see if I can get it to work. Thanks!
@isladogs - I see what you are saying, but this appears to be a larger move of screen real estate than a rounding error. I didn't get too much time yesterday to experiment.

I already had your Move Form & Control v4.7 downloaded and noticed that the "Screen & Form Information& Form even without a border has a value of "45" for the Vertical Border Width and "45" for the "Horizontal Border Height". I tried incorporating that into my code but it didn't seem to do anything. Like I said, I have some time today to experiment.
 
So, I couldn't begin to tell you WHY it is this way, but...

I simply logged all of the changes and it was a fixed difference of 24 less horizontal and 372 less vertical. At this point the size of the form doesn't seem to matter as I use a small 4" x 2.5" login form and then my standard interface form is 10" wide and 8.25" high.
 
UPDATE: Adding the offsets has fixed the positioning!
 

Users who are viewing this thread

Back
Top Bottom