Solved

How to use colour to distinguish between different versions of a database.

Posted on 2011-03-22
11
356 Views
Last Modified: 2013-11-28
How can I change the colours of the Access application window and/ or the database window (ie, the window that shows all of the tables, queries, etc) and/ or all of the forms of a database in order to provide a constant visual cue to distinguish, say, between the development version, user version, sandbox version of a database? I would like these chanegs to be made automatically via code when the database opens.
0
Comment
Question by:Milewskp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
11 Comments
 
LVL 47

Assisted Solution

by:Dale Fye (Access MVP)
Dale Fye (Access MVP) earned 150 total points
ID: 35189957
Don't know how to do it for the "application or database window", but I've occassionally used the form header and footer for this type of functionality in the past.

I generally have a table in my applications for database specific properties (tbl_db_Properties).  This table only contains one record, and as many fields as I need.  You could store a value in that table to indicate the "version" of the application, and use the forms Paint event to change the color of the header, something like:

Private Sub FormHeader_Paint()

    Dim strVersion as string

    strVersion = DLOOKUP("Version", "tbl_db_Properties")

    me.section(acHeader).backcolor = Switch(strVersion = "Development", rgb(255, 0, 0), _
                                                                      strVersion = "User", rgb(0, 255, 0), _
                                                                      strVersion = "Sandbox", rgb(0, 0, 255), _
                                                                      True, rgb(255, 255, 255))

End Sub

You could also do this using database properties, which would not require a table, but would require some code to set and read the properties you create.

0
 
LVL 1

Author Comment

by:Milewskp
ID: 35190934
Thanks fyed,
Do you know which database properties would apply?
Do you know what other parts of a form can be colourized besides Section, Detail, and the form's controls?
0
 
LVL 1

Author Comment

by:Milewskp
ID: 35191002
Is there any way to change  the colour of the application window, database window, and /or form window headers  (see attached)?
aa.doc
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 35191236
I create my own.  This has the added aspect of anyone who gets access to your application, who shouldn't probably will not think about looking in the database properties for values such as this.

This is where I normally put the connection string or name of the backend Access database, it is not hard coded or in a table.
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 350 total points
ID: 35191369
"Is there any way to change  the colour of the application window, database window,"
Yes >>  http://www.lebans.com/changemdibackground.htm
Note: For some reason, this does not work on Windows 7 x64, not sure about x32.

mx
0
 
LVL 75
ID: 35191493
Colors ?   Not really a problem ...

download these images and view on an LCD with good color and resolution to get full effect.

mx
Capture1.gif
Capture2.gif
0
 
LVL 1

Author Comment

by:Milewskp
ID: 35191633
Hi mx,
http://www.lebans.com/changemdibackground.htm>
Can you point to the code that allows you to change the colours of the application window and database window?
0
 
LVL 75
ID: 35191672
"database window?"
Don't know of a way to change the db window, if you are referring to the database container where tables, queries, forms, etc., are listed.

Application Window aka MDI Background ... the Lebans app does that nicely.

mx
0
 
LVL 1

Author Comment

by:Milewskp
ID: 35322934
Hi mx,
<MDI Background>
What does 'MDI' stand for?
0
 
LVL 75
ID: 35326061
MDI = Multiple Document Interface

mx
0
 
LVL 1

Author Closing Comment

by:Milewskp
ID: 35470545
Thanks gents, and sorry for the delay in closing this question.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question