MS Access Logo and backgground pict

is there a way to change logo's and background pict example i have a login form with a image of the company as the background can i have a form with the link to that pict so if company changes all the company does is change the link and the photo will change, using this same method for logo on reports! the form for company information is linked to a table called tblCompanyInfo please help also on the form/table the name of the fields will be CompanyBackground and CompanyLogo on the CompanyBackground i need it to have setting for the layout of the photo! thanks
Who is Participating?
Jeffrey CoachmanMIS LiasonCommented:
How much do you know about VBA?

The solution is not really a "do this and it will work" type of solution.

There are many ways that you could go about this.
The main issue is that at some point the name of the company (The CompanyID actually) must be stored "Somewhere"

Basically you could create a table with the location for each Company and the associated Path to the specific image.

Then create a Public Constant to store the CompanyID
Public Const lngpubconstCompanyID As Long = 4

The use code like this to set the logo:
Private Sub Form_Open(Cancel As Integer)
    Me.Logo.Picture = DLookup("LogoPath", "tblCompanyLogo", "CompanyID=" & lngpubconstCompanyID)
End Sub

So by changing the CompanyID for the Public constant, you change the logo on the form.

Here is a working sample, you will have to edit the CompanyLogo table to reference your specific images

Play around with this, then post back if you have any question.


Blueice13085Author Commented:

I have got to say that example really help out a lot and you have answered me wonderfully. I could not have got any better of a response. I also changed a few things but not much. i added a field called BackgroundPath and on the form i use this on the on open event

Me.Picture = DLookup("BackgroundPath", "tblCompanyLogos", "CompanyID=" & lngpubconstCompanyID)

This then changes the background picture!
Jeffrey CoachmanMIS LiasonCommented:
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.