Re: Accessing forms properties



Thanks Allen and Marsh for your replies. The Container().Documents...
solution looks like the way to go - much better than using the Tag property.
cheers
peterD

"peterDavey" <peter.davey@xxxxxxxxxxxxx> wrote in message
news:uxZSoMhnFHA.1996@xxxxxxxxxxxxxxxxxxxxxxx
> G'day,
> I'm pretty new to Access but have Excel VBA experience.
>
> I have an Access 2000 application with a number of forms and sub-forms.
At
> startup I display a form with a list box listing the forms I may want to
> use. At the moment the form names are hard coded into the list boxe's
> DataSource property.
>
> What I want to do is use the Tag property of each form to flag the forms
> that I want listed in the list box. When the 'menu' form opens I need the
> code to loop through all forms and, where the tag property doesn't = 0,
add
> it to the list box.
>
> I've found that using the AllForms collection gives me access to all the
> forms however I haven't been able to successfully access the Tag property
> using the Properties collection. Using the code:
>
> MsgBox
> Application.CurrentProject.AllForms("Wards").Properties("Tag").Value
>
> generates an error: 'you entered an expression that has an invalid
reference
> to the tag property'
>
> Not sure what I'm doing wrong.
>
> cheers
> peterDavey
> Melbourne
>
>


.



Relevant Pages

  • Re: Accessing forms properties
    ... >startup I display a form with a list box listing the forms I may want to ... >What I want to do is use the Tag property of each form to flag the forms ... When the 'menu' form opens I need the ... The AllForms collection only provides the name ...
    (microsoft.public.access.formscoding)
  • Accessing forms properties
    ... I have an Access 2000 application with a number of forms and sub-forms. ... startup I display a form with a list box listing the forms I may want to ... What I want to do is use the Tag property of each form to flag the forms ... I've found that using the AllForms collection gives me access to all the ...
    (microsoft.public.access.formscoding)