Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want to include the employees signature in a letter

Status
Not open for further replies.

paul123456

Technical User
Apr 29, 2002
518
0
0
US
Hi, I want to include the employees signature on the bottom of my letter. My database is already set up a special way so i can't make changes to the scheme of it all. we have around 8 letters. and about 13 employees use each one with about 13 different queries they can run to them. as of now i have this nefty little code that put there name on the bottom of the letter along with a title which is another code.

=DLookUp("Name","Users","UserID = '" & Environ("Username") & "'")

I was think i could do the same thing but instead of a name a picture. My idea is If (username) exist then place this picture if not go on. then if (username) exist then place this picture if not go on. i can do this for the people that need the signatures at the bottom but i also need it so that if the name of the person isn't logged on then it does not place anything

Im in the process of searching for this, if anyone has seen any ideas or know a way to do this please msg on this post..

Thanks Fellas...and Gals

Paul

Thanks, PAUL

 
Hi, I did something similar to this where my wife wanted little stamp sized pictures for various holidays on her envelopes.

I created a small table that had a description (text), month (text) and picture (oleObject). I inserted small bitmaps into the table for each holiday.

On the letter I had a bound object frame whose control source was a Dlookup based on the month:

=DLookUp("[picture]","tblPicture",("[month] = left(date,2)") - or something like that.

You could do something similar for your report. Store the signatures in a table and display them based on your UserID.
 
Sounds interesting. How do you store images in a table?

Jim DeGeorge [wavey]
 
Hi, Add a field to your table, select data type as Ole Object. Go to normal view, right click on the field. Insert Object displays and follow the directions. I ususally link to an image to save space but for the small stuff.........
 
Hi, can anybody tell me how to get a signature it to a table?

Iam right in thinking that the signature is stored in a normal table, within access ?
 
I am starting to work on this right now...i'll give u guys a heads up if i get it to work succesfully.

Thanks, PAUL

 
I can't get this to work, heres what i got.. a table called users with records names and signatures. I did the names as text and signatures as OLE Object. I inserted the picture of the signature to the users name in the signature box. in my report i have a lookup like below

=DLookUp("Signature","Users","UserID = '" & Environ("Username") & "'")

This basically lookups the person logged in and then looks at the sinature and inserts it. But i am getting a box like code of crap instead of the picture??? the lookup for the name works fine??? can someone help me plz...

Thanks, PAUL

 
Hi, if this is on a report it hsould be a little more straight forward than that:

=DLookUp("[Signature]","Users","[UserID] = [txtYourRptField]")

Give that a try.
 
I Believe the & Environ("Username") & "'") looks at the user logged in and compares to the user in the user table.

For example if a user with the user id of bgates logs in i would put bgates in the user id in the userid field in the user table..and next to that his full name..then his title..and then i added a signature field for the picture.

so if i put
=DLookUp("name","Users","UserID = '" & Environ("Username") & "'") it will bring up the users name and if i put
=DLookUp("title","Users","UserID = '" & Environ("Username") & "'") it will put the users title



Thanks, PAUL

 
Hi, I'm not really familiar with Environ, other than I think it obtains the computer name, so I cannot comment on that.

It sounds as though you want a signature to show based on who is logged in and generating a report. There are a number of threads in the Vb forums that deal with that.

Perhaps someone else could steer Paul in the right direction?
 
Guys,

Still had no luck on this, i have been trying to get a signature stored in a table, if i store a bitmap it prints out like a jumbo marker can you store jpegs within access?

 
i know that u make the field as a Ole Object. and u just put the path to were the picture is..if its on the server i beleive u can put a unc path to the shared folder..but i still have not figured out how to do this and i have search all over the place...you would think that this is easy to do??

Thanks, PAUL

 
Hi

With regards to the Environ("Username") function call, this retrieves the username environment variable from the operating system.
This will work fine on Windows NT 4, 2000 and XP. It will not work on Windows 95, 98 or Me because these operating systems don't set the environment variable USERNAME to the login ID of the current user.
plddavis is correct in that Environ can also be used to obtain the computer name on NT, 2000 and XP, using Environ ("COMPUTERNAME") but again this won't work on the 9x family of operating systems.

Somewhere in the Access forums there is an FAQ on using API obtaining the network username which includes API calls that work on the 9x family of operating systems as well as the NT/2K/XP family.

John
 
Hi, well I had a look at the wife's database with the seasonal stamps and i need to make a correction. What I did was first imported the bitmaps into MS Word and set the background in some cases to transparent. I then cut and pasted them into the Access table. The field is OLE object and the paste shows as a MS Word document. There is a month field so depending on the month, a seasonal picture is printed on the envelope in a bound object frame.

So, that shouldn't be too tough to do using a signature and a lookup. If lookup's are problematic, you might store the peoples names in a table with the accompanying signature and have a combo select on a form - 'Who is the letter for?' - Select the person and print that signature with the report.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top