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

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.
LVL 1
MilewskpAsked:
Who is Participating?
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Connect With a Mentor Database ArchitectCommented:
"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
 
Dale FyeConnect With a Mentor Commented:
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
 
MilewskpAuthor Commented:
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
MilewskpAuthor Commented:
Is there any way to change  the colour of the application window, database window, and /or form window headers  (see attached)?
aa.doc
0
 
Dale FyeCommented:
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
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
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
 
MilewskpAuthor Commented:
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
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
"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
 
MilewskpAuthor Commented:
Hi mx,
<MDI Background>
What does 'MDI' stand for?
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
MDI = Multiple Document Interface

mx
0
 
MilewskpAuthor Commented:
Thanks gents, and sorry for the delay in closing this question.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.