Re-centre a form?

mercredi 29 avril 2015

I originally posted this query in Forms...but perhaps it better fits here? I guess it overlaps the categories? Happy for Mods to delete one.

The short tale is that I've written VBA code that hides or shows certain fields on a form depending on whether the user ticks a checkbox in the form's header. I've already written code that shuffles the columns and controls around so there isn't a gaping hole where the hidden fields are, and I've used 'DoCmd.RunCommand acCmdSizeToFitForm' to resize my form. It all works fine.

What I can't find is simple concise code to re-centre the form in its smaller size. The 'Autocenter' property of the form is already set to True, it seems bizarre there is no way to re-trigger it, or force the form to re-draw (and hence re-trigger it).

Any ideas? Thank you.
Re-centre a form?

0 commentaires:

Enregistrer un commentaire

Labels