We help IT Professionals succeed at work.

Access 2003/2007 background colour

chestera
chestera asked
on
Hi EE

Create an app with a  custom menu bar. Open the app custom menu bar at the top and the colour of the bacground is gray. My question.Is there a way of changing the default colour similar to how you can change the desktop colour  in windows without creating a form to simulate a different background. I have been told it can't be done in access.

chestera
Comment
Watch Question

Hamed NasrRetired IT Professional

Commented:
Attach your sample daqtabase with created custom menu bar.
Scott McDaniel (EE MVE )Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014

Commented:
If you mean changing the color of the Access window then no, you cannot do that AFAIK (although you __may__ be able to do it by changing options in the Windows Theme settings, but I'd be very leery of that, since that is machine-wide).

Hopefully is hnasr knows how to do this, they can post the acutal code needed to do this, or a short explanation of the methods to use.

Author

Commented:
hnasr
The app is to large to post but I will modify and attach. Thank you for your help
chestera
Hamed NasrRetired IT Professional

Commented:
Ok! what is required just enough objects to demonstrate the issue. Dummy data as well.

Author

Commented:
hnasr
Find attached app menu. I have removed the content hope this is ok
When opened just get the defaiult gray background..
chestera
TimeFront.mdb
Database Architect / Application Developer
Top Expert 2007
Commented:
This will change the background color of the Access application window:

http://www.lebans.com/changemdibackground.htm   (free)

mx
Hamed NasrRetired IT Professional

Commented:
This is a big size database. After removing the non relevant objects you need to compact and repair, and that will reduce the size to less than 1mb.
Hamed NasrRetired IT Professional

Commented:
File size <500k after compact and repair.
Ok what to do and what to look for?
I am using access 2007.

Author

Commented:
hnasr

Thanks for you trouble but looks like databasemx has the solution. I am sing access 2003

chestera

Author

Commented:
databasemx

I have down loaded the file wil get back to you and let you know how it goes

Alan
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
ok.  I've tried it and it does work.

mx

Author

Commented:
databasemx

Yep it works. I haven't gone through the code yet is it possible to keep the colour selected when open the app

Alan

Author

Commented:
databasemx

In the form AddImagetoMDIBackground and button cmdRestoreMDIChange the following code
Dim blRet As Boolean
Dim lngColor As Long
' Open the standard Windows
' Color Dialog Window.
    'lngColor = aDialogColor(Me.hwnd)
    lngColor = 4227072
    ' If user cancel Color DIalog window request WHITE
    If lngColor = -1 Then lngColor = RGB(255, 255, 255)
    blRet = RestoreMDIBackGroundImage(lngColor)
End Sub

rem LngColor = aDiualogColor(Me.hwnd) and change to
LngColor = 4227072 (or Color of Choice)

Not tried yet but I think if use this code on startup selected color will be retained

alan
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
ok ...

Author

Commented:
databasemx

Thank you foryour help

Alan
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
You are welcome Alan ... long live Lebans ...

mx

Author

Commented:
databasemx

I now have their web site

all the best
Alan

Commented:
DatabaseMX:

The Lebans solution does not work in Acc2007 and Lebans is now retired, any other ideas? I'm happy to open another question.
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
Let me try it tonight or tomorrow in A2010.

mx

Commented:
MX


any luck ?
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
Sorry ... totally forgot.  ok ... I put a note in my outlook calendar ...

mx
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
Well, yes unfortunately it does not work in A2010.  Code compiles ok, but nothing happens.

No clue why, sorry.

As I start working more in A2010 (soon), maybe I will stumble across some option that has to do with this.

mx