[AccessD] Option Group's Control Collection - Weird Behavior

jwcolby jwcolby at colbyconsulting.com
Thu Aug 26 08:55:08 CDT 2010


A.D. / Michael,

If I remember correctly, objects in Access are not individual "windows", in other words you cannot 
get a handle to window for a combo or a text box (or anything else) in Access.  In most programs, 
when a graphical object is drawn by the windows operating system, Windows maps the memory, Windows 
draws it, and Windows hands you back a Handle To Window for that object, IOW it creates a handle to 
the exact piece of screen real estate that Windows uses.

This is all just vague memories but the bottom line is that every "object" on a form is somehow 
drawn internally by Access (not directly by Windows), and I *believe* that is what you are running 
into here.  When you programmatically move objects around, you are confusing the code internal to 
Access that draws and keeps track of where objects are drawn on the screen.

IIRC Drew knows a lot about this stuff, in fact I think it was Drew that discussed all this stuff 
ages ago.

John W. Colby
www.ColbyConsulting.com


Michael Mattys wrote:
> Hi A.D.,
> 
> I changed the number to move in the loop to 10.
> I haven't come upon a solution yet, but I do find this amusing!
> 
> Michael R Mattys
> Business Process Developers
> www.mattysconsulting.com
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal
> Sent: Thursday, August 26, 2010 1:29 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Option Group's Control Collection - Weird Behavior
> 
>     Further to my previous post, I would like to add that the anomaly is
> confined to manipulation of top property, if the toggle buttons are in same
> horizontal alignment to start with. No problem with left property.
> 
> Best wishes,
> A.D. Tejpal
> ------------




More information about the AccessD mailing list