Control Properties on Access forms via DAO 
Author Message
 Control Properties on Access forms via DAO

I think that Controls collection is only available when the form is
opened (either in design or normal view). Now the question is how to
open a form which is not in current database. I dunno. I guess you can
import each form into current db and open it - eek...

For what it's worth.

Dimitri

Quote:

> I'm trying to loop through forms of a group of Access v2 databases using
> v97.  I can see the forms via the containers collection and can get the
> names of the forms via documents, but not the controls and their
> properties.  I've looked at the diagramatical DAO hierarchy and could
> not see controls.  How can I access properties of controls on forms from
> other databases?

> -mario



Sun, 25 Feb 2001 03:00:00 GMT  
 Control Properties on Access forms via DAO
I'm trying to loop through forms of a group of Access v2 databases using
v97.  I can see the forms via the containers collection and can get the
names of the forms via documents, but not the controls and their
properties.  I've looked at the diagramatical DAO hierarchy and could
not see controls.  How can I access properties of controls on forms from
other databases?

-mario



Mon, 26 Feb 2001 03:00:00 GMT  
 Control Properties on Access forms via DAO
Jos,

Thanks for the hint. But the original poster needs to go through
Access 2 databases from an Access 97 database. Will the old version
code work without conversion in A97? Also, can you set references "on
the fly" as you loop through databases?

Dimitri

Quote:

> Hello Dimitri

> You can use form in an other database by setting a reference to that
> database. Keep in mind however that on all places where something like

> set dbs = currentdb or set dbs = dbengine(0)(0)

> occurs you must substitute this for

> set dbs = codeDB

> Greetings

> Jos


> >I think that Controls collection is only available when the form is
> >opened (either in design or normal view). Now the question is how to
> >open a form which is not in current database. I dunno. I guess you can
> >import each form into current db and open it - eek...

> >For what it's worth.

> >Dimitri


> >> I'm trying to loop through forms of a group of Access v2 databases using
> >> v97.  I can see the forms via the containers collection and can get the
> >> names of the forms via documents, but not the controls and their
> >> properties.  I've looked at the diagramatical DAO hierarchy and could
> >> not see controls.  How can I access properties of controls on forms from
> >> other databases?

> >> -mario



Mon, 26 Feb 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Accessing Control Properties Via its Handle

2. Accessing the properties of a control when that control is on another form

3. Add Field via DAO - Set Format Property

4. Changing Field Properties via DAO 3.6

5. Changing Field Properties via DAO 3.6

6. Adding Properties to Controls via My Control

7. VB 6 ActiveX Control in Windos Form, can't access any custom properties

8. Access control property on inherited form

9. Access to the collection of the controls of a form and their properties from out

10. Linking Excel to Access via DAO

11. Problem accessing SQL Server with VB5 via DAO

12. Access DB via VB5/DAO

 

 
Powered by phpBB® Forum Software