[AccessD] Programatically set Autoformat

DWUTKA at marlow.com DWUTKA at marlow.com
Tue Dec 30 14:29:19 CST 2003

No idea if there is a better way, but here's how I would approach it.  Make
a blank form, using the format of your choice.  Save it as frmStandard or

Then loop through the Forms collection (of the Documents collection (I
think)), to open each form, in design view, and set the properties equal to
that of the frmStandard properties.  You could also match formatting of
controls that way, by creating a loop within that loop to match control
types with similar controls on frmStandard.

I would use that 'dummy' form so you won't have to hardcode the properties
that you want, plus, when you are done, you can keep that code, and if you
want to make a change, just simply change frmStandard and run the code


-----Original Message-----
From: Lonnie Johnson [mailto:prodevmg at yahoo.com]
Sent: Tuesday, December 30, 2003 12:25 PM
To: 'MS-ACCESS-L at lists.missouri.edu'; AccessDevelopers; ms_access;
AccessD solving'
Subject: [AccessD] Programatically set Autoformat

Is there a way through VBA to set the AUTOFORMAT of a form to one of the
predetermined settings?
I have a database that has a hoard of forms that were developed by different
people and they have various colors and schemes. I now want to set them all
to the same scheme that is listed in the AUTOFORMAT wizard of the forms
design view.
It sure would be easier than doing each one at a time.

Lonnie Johnson
ProDev, Professional Development of MS Access Databases
Visit me at ==> http://www.prodev.us


Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
AccessD mailing list
AccessD at databaseadvisors.com
Website: http://www.databaseadvisors.com

More information about the AccessD mailing list