D Douglas J Steele Feb 3, 2006 #2 What exactly do you want to know about the form? For example, the following code will list all of the controls on a given form: Sub DocumentForm(FormName As String) Dim ctlCurr As Control DoCmd.OpenForm FormName, acDesign, , , acFormReadOnly, acHidden For Each ctlCurr In Forms(FormName).Controls Debug.Print ctlCurr.Name Next ctlCurr DoCmd.Close acForm, FormName, acSaveNo End Sub -- Doug Steele, Microsoft Access MVP (no e-mails, please!) FatFurryGuy said: I am trying to get access to Forms programatically - ala Database Click to expand... Documentor
What exactly do you want to know about the form? For example, the following code will list all of the controls on a given form: Sub DocumentForm(FormName As String) Dim ctlCurr As Control DoCmd.OpenForm FormName, acDesign, , , acFormReadOnly, acHidden For Each ctlCurr In Forms(FormName).Controls Debug.Print ctlCurr.Name Next ctlCurr DoCmd.Close acForm, FormName, acSaveNo End Sub -- Doug Steele, Microsoft Access MVP (no e-mails, please!) FatFurryGuy said: I am trying to get access to Forms programatically - ala Database Click to expand... Documentor
G Guest Feb 6, 2006 #3 This is exactly what I needed; I tried something similar – driven from the AllForms collection, but kept stumbling over code executed in Load/Open procedures. Hadn’t considered acFormReadOnly & acHidden. Thanks much Douglas!
This is exactly what I needed; I tried something similar – driven from the AllForms collection, but kept stumbling over code executed in Load/Open procedures. Hadn’t considered acFormReadOnly & acHidden. Thanks much Douglas!