• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 308
  • Last Modified:

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
0
Blueice13085
Asked:
Blueice13085
  • 2
1 Solution
 
OP_ZaharinCommented:
0
 
Jeffrey CoachmanCommented:
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.
tblCompanyLogo
CompanyLogoID
CompanyID
LogoPath

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.


JeffCoachman

Access-EEQ-26963868-ChangeLogoIm.mdb
0
 
Blueice13085Author Commented:
boag2000:

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!
0
 
Jeffrey CoachmanCommented:
Grrrrrrreat!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now