Linking Company logo to various forms

G

Greg

I have tblCompany that has a field "Logo" as an ole object. There will
be only one record in tblCompany. I would like to link the logo into
various forms and reports "frmSplash" "frmCustomer" without having to
link or embed on each form/report.

I may have two or more different companies using this database so i
would like to automate a little bit.

Many Thanks in advance
Greg
 
T

Tom Ellison

Dear Greg:

When you assign the logo now, you must find the path to the image file.
When you do so, I expect you're using an image control. Under the
properties of this control, under the Format tab, the second property is
Picture Type, which can be Embedded or Linked. So, as you said, "link" is
the key word here. If you embed it, it is placed into the database and is
not flexible.

Now, if you link to it, then the path to the object MUST be the same on
every computer at each company. The two companies can have different paths
and file names for it, and you would modify your softeare for that. This
could even be a network path, so there would be just one copy of the logo on
a "logo server" (I just made that up!). Set up properly, then every
computer at either client would have the same logo path and filename.

For me, I have chosen to embed such a logo. That overcomes the "path"
difficulty.and provides me with a benefit. If someone steals a copy of the
software their copy would print the logo of my client's company on all the
documents that are to be sent out by mail. No one would want that! So,
it's a bit of copy protection. If you don't destribute the MDB, it can't
easily be changed, either.

I even had a client sell their company to another. This meant I had early
contact with the purchasing company, and some initial work to do for them.

I don't consider this mean and nasty, but good, prudent business. I own the
software, not the clients (especially in the case of a vertical package for
multiple clients, which I resell and license accordingly. My terms for a
new company who buy-out an existing client are lenient, but I at least like
to meet the new people early on.

Tom Ellison
 
T

Tom Ellison

Dear Greg:

I failed to mention this. If you do not wish to maintain separate software
for each company, whether you link or embed, you can still do either a link
or embed.

In my software, the database is loaded and run from a same folder (under
Program Files) but that folder is different at the two companies. I test
this path so the software know which one is running. For cirsumstances like
this one, I save that path in a global variable. I can then test the global
variable and see which company is running the software. Differences like
this are coded in a Case statement that makes each company's installations
run differently. I would have two image controls, one visible, the other
not (for 2 companies, 3 for 3 companies, etc.) All are the exact same size
and location. I make only the appropriate one visible, the others not.

So, there's not a single modification to the software to install one or the
other.

Tom Ellison
 
G

Greg

Tom said:
Dear Greg:

I failed to mention this. If you do not wish to maintain separate software
for each company, whether you link or embed, you can still do either a link
or embed.

In my software, the database is loaded and run from a same folder (under
Program Files) but that folder is different at the two companies. I test
this path so the software know which one is running. For cirsumstances like
this one, I save that path in a global variable. I can then test the global
variable and see which company is running the software. Differences like
this are coded in a Case statement that makes each company's installations
run differently. I would have two image controls, one visible, the other
not (for 2 companies, 3 for 3 companies, etc.) All are the exact same size
and location. I make only the appropriate one visible, the others not.

So, there's not a single modification to the software to install one or the
other.

Tom Ellison
Thank you for all the insight Tom; Makes one look at things from a
different angle.

What my idea is to have them embed their logo into the tblcompany thru
frmCompany. I like the idea of copy protection
How about if I put their company info into a hidden tblCompany.
I have about 5 or 6 places i would like their company logo and other
info to display. I figured if I input data one time would save time and
consistency.

Greg
 
T

Tom Ellison

Dear Greg:

Even if you hide the table, someone may figure it out. Then you've got no
security. I'm not sure, but I think this is relatively easy to break. You
can just unhide everything. It takes VB code, stepping through all the
tables, but it's not hard. There's really nothing secure about it.

With an MDE or run-time, and embedded logos, it's not going to be so easy to
break your lock. Still possible, but not so easy.

The negative side is the size of the MDB grows with each copy of the logo
embedded. Try to keep the logo small, just enough resolution for what you
need to see.

Tom Ellison
 
S

Stephen Lebans

Another option Tom, is to:
1) Load the logo in to the standard Image control(not the OLE Frame
control).
2) Saved the PictureData property of the Image control to a Long Binary
field.

When you want to display the logo simply copy the contents of the field to
the PictureData property of a suitable placed Image control.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
T

Tom Ellison

Dear Stephen:

I would think the advantage of this would be to reduce the bloating of the
application database, which it would certainly do. I had recommended using
a minimal sized image. Storing a high res image for a small picture printed
on reports would be very wasteful, especially if it is in many reports.

With storing it in a table, I would think any fairly competent programmer
could replace it with another logo, defeating the "copy protect" feature I
was trying to effect.

Tom Ellison
 
G

Guest

You can simply add this table to every report data source.

But that will not always work with forms. With forms, you
sometimes have to join the table to the data source, so your
other tables could have an index field which connects to logo
table. Or you can use a calculated field as the join field.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top