Look through all forms in Access Database and set back colour
Hi all
Am trying to loop through all forms in database and set the back colour to a colour.
Is this possible??
I code set lead me to only active forms......other code leads me to just list form names in Access Forms Container
Any ideas???
cheers George
VB Code:
Static dbsCurrent As Database
Dim cntTemp As Container
Static intCount As Integer
Dim intCounter As Integer
Static Objects() As String
Dim varreturn As Variant
Dim prp As Property
Set dbsCurrent = CurrentDb()
Set cntTemp = dbsCurrent.Containers("Forms")
intCount = cntTemp.Documents.Count
ReDim aObjects(intCount) As String
For inCounter = 1 To inCount - 1
cObjects(intCounter) = cntTemp.Documents(intCounter).Name
cObjects(intCounter) = cntTemp.Documents(intCounter).Properties.Append ?????? unsure how to use this
Next intCounter
Re: Look through all forms in Access Database and set back colour
If you use the Forms collection you will still have to only get access to the forums that are actually open.
Re: Look through all forms in Access Database and set back colour
yup found that out....is it possible to set all forms in Access database when the user opens to 1 colour for each forms back colour.....
Can seem to get this to work at all....Access 97 BTW
Re: Look through all forms in Access Database and set back colour
You could modify each forms _Load event to set the backcolor.
Re: Look through all forms in Access Database and set back colour
yup thats what I ended up doing....just thought there would be easier way.
cheers George