John W. Colby
jwcolby at colbyconsulting.com
Sat Jun 25 19:34:13 CDT 2005
One of the things that has always fascinated me is the concept (never actually implemented) of using DAO to "drill down" into a bound control to discover what field and table the object is bound to, and after that "drilling down" into that field in the table to discover what datatype the control is displaying. For example, a control could be bound to a field whose datatype is date. You could have a rule that "all dates should be displayed in YYYMMDD format", but in the future the powers that be could decide that they wanted DDMMYYYY. If you have ever designed a large system, or worse inherited one, you can probably relate to trying to find all such controls in a large system and changing the format from whatever the developer applied (or didn't apply) to a standard format. Some controls may have a format in the format property, others may depend on format strings applied to the field at the database level. Others may have no specific format, relying on the windows default. I believe that it is possible to perform this function with DAO but is it possible with ADO? To my knowledge only ADO can access properties of objects stored in a database container (a form or control). As for fields in tables, I know that DAO can do so, I have no idea whether ADO could return the data type of a field in a table. Is this possible? John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/