Guys, sorry it's a along time since I posted, and I only ever seem to post queries.
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.
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.