Link to home
Start Free TrialLog in
Avatar of chestera
chestera

asked on

Access 2003/2007 background colour

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
Avatar of Hamed Nasr
Hamed Nasr
Flag of Oman image

Attach your sample daqtabase with created custom menu bar.
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.
Avatar of chestera
chestera

ASKER

hnasr
The app is to large to post but I will modify and attach. Thank you for your help
chestera
Ok! what is required just enough objects to demonstrate the issue. Dummy data as well.
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
ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
File size <500k after compact and repair.
Ok what to do and what to look for?
I am using access 2007.
hnasr

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

chestera

databasemx

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

Alan
ok.  I've tried it and it does work.

mx
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
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

Thank you foryour help

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

mx
databasemx

I now have their web site

all the best
Alan
DatabaseMX:

The Lebans solution does not work in Acc2007 and Lebans is now retired, any other ideas? I'm happy to open another question.
Let me try it tonight or tomorrow in A2010.

mx
MX


any luck ?
Sorry ... totally forgot.  ok ... I put a note in my outlook calendar ...

mx
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