|
-
May 22nd, 2006, 09:14 AM
#1
Thread Starter
Fanatic Member
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
Last edited by Ggalla1779; May 24th, 2006 at 06:44 AM.
-
May 22nd, 2006, 10:24 AM
#2
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 22nd, 2006, 10:29 AM
#3
Thread Starter
Fanatic Member
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
-
May 22nd, 2006, 10:32 AM
#4
Re: Look through all forms in Access Database and set back colour
You could modify each forms _Load event to set the backcolor.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 24th, 2006, 06:43 AM
#5
Thread Starter
Fanatic Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|