Control Anchoring - Control to Control? (2007)

stevenblanc

Registered User.
Local time
Today, 11:44
Joined
Jun 27, 2011
Messages
103
Greetings folks,

It's been a while since I've found myself tied in a knot.

In Access 2007 is it possible to anchor a control to another control rather than the form boundaries?

I have two rectangles: box1 aligned to the left and box2 aligned to the right.

I would like to maintain the distance between the right of box1 and the left of box2 while having them anchor to the outsides. How would I go about this?

I attempted to put code into the Resize function of the form, but that seems to be overridden by anchoring.

Ready?

Go!
 
Gina,

That just might help. Though I won't be certain till I sift through it. Somewhere buried in there is also a solution to setting minimum form sizes. Though I suspect there is alot of unnecessary functionality there.

It seems that that piece of code was developed for excel VBA users and primarily handles the functions that Access natively handles with form Anchors, ie, anchor to left/right/top/bottom of form. I should be able to adapt it to use another controls properties rather than the form properties.

I'll let you know how it goes.
 
Maybe you could do it by using a subform but if I was trying something like that I would emulate the structures in Cascaded Style Sheets.
 

Users who are viewing this thread

Back
Top Bottom