MS Access Logo and backgground pict

Posted on 2011-04-18
Last Modified: 2012-05-11
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
Question by:Blueice13085
    LVL 23

    Expert Comment

    LVL 74

    Accepted Solution

    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.



    Author Comment


    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!
    LVL 74

    Expert Comment

    by:Jeffrey Coachman

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now