Trying to get a signature scanned file to appear on a form

I have a form that has a image block on it.  I'm trying to get a scanned signature to appear in the field with this oncurrent event of the form but it isn't working.  What am I doing wrong?

Me.imageMechEmployeeSig = DLookup("[SignatureScan]", "tblEmployees", "[EmployeeID] = " & Me.cboMech)

In the table, tblEmployees the field SignatureScan is an attachment field.
SteveL13Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MacroShadowCommented:
Try:
Me.imageMechEmployeeSig.Picture = DLookup("[SignatureScan]", "tblEmployees", "[EmployeeID] = " & Me.cboMech)

Open in new window

0
SteveL13Author Commented:
Didn't work. I get an error ---  Object doesn't support this property or method.
0
MacroShadowCommented:
What kind of control is imageMechEmployeeSig?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

SteveL13Author Commented:
A bound image frame.
0
MacroShadowCommented:
Try using an Unbound Image Control.
0
SteveL13Author Commented:
Getting close.  The form is a continuous form and the image does appear but now it appears in that field on all of the records?????
0
MacroShadowCommented:
Why don't you just use a bound control. No need for code to load the picture at all.
0
SteveL13Author Commented:
Because then I get back to... I get an error ---  Object doesn't support this property or method.
0
MacroShadowCommented:
When you use an Image Control?
0
SteveL13Author Commented:
Yes.
0
MacroShadowCommented:
0
SteveL13Author Commented:
I appreciate the info but I really want to use the attachment filed option in this case.  I just can't figure out why the image is repeating on all records in the continuous form.
0
MacroShadowCommented:
You can't. This is a built in limitation in Access, the image control cannot be bound to a field in a continuous form, this is to prevent crashing in event of a large table.
0
SteveL13Author Commented:
So then could I somehow make it an unbound control and just have it be populated with an afterupdate event of the combobox?  cboMech is the combobox.

Me.imageMechEmployeeSig.Picture = DLookup("[SignatureScan]", "tblEmployees", "[EmployeeID] = " & Me.cboMech)
0
MacroShadowCommented:
Yes, but then you will get the same image for all the records.
0
SteveL13Author Commented:
I guess I don't understand why this is any different than any other afterupdate event of a combobox.
0
IrogSintaCommented:
You don't need to use any code for this.  You just need to use a bound control.  The problem is you are using the wrong control for this.  You need to use the Attachment control.  The icon for this looks like a paperclip.  Once you add that control to your form, you just need to change the ControlSource to point to your attachment field.

Another way to do this is to click on Add Existing Fields and drag the whole attachment field group onto your form.

Ron
0
John TsioumprisSoftware & Systems EngineerCommented:
Let me understand something
you have a continuous form and you want when you change the value of the combobox to have a unbound picture control to show you a specific picture...
Can you share a screenshot to see if i am missing something
0
SteveL13Author Commented:
Attached is a snapshot of just the part of the continuous form I am concerned with.  When the user selects a record from the combobox, two things need to happen...

1) His/her employee number is to populate the upper right-hand corner text box.  This is already working perfectly.

2) Also, after selecting a record in the same combobox, the employee's signature is to appear in the lower "picture box".

The signature file exists in a table named tblEmployees in an attachment field named "SignatureScan".

Combobox Example
0
Anders Ebro (Microsoft MVP)Microsoft DeveloperCommented:
I made this sample for you. It gets the information into the continues form by the use of a left join to the primary table. (See the recordsource for the form).

As far as I can see it satisfies your requirement of having the signature in a attachment field, and being able to show it in a continuous form.

AND its a no.code solution.

EDIT: Included a screenshotExample PictureTestGetImage.zip
0
SteveL13Author Commented:
Anders, For some reason I cannot get my form to work like you did.  Please see the attached.  Select John Doe in the 1st combo box.  I do not know why the signature is not populated the signature field under the combo box.
Example.accdb
0
Anders Ebro (Microsoft MVP)Microsoft DeveloperCommented:
Maybe its just because I am on my phone now, but the attachment reads as being 0 bytes?
0
SteveL13Author Commented:
I don't even know where you see the attachment size.  Sorry.  There is an attachment in the employee table.
0
Anders Ebro (Microsoft MVP)Microsoft DeveloperCommented:
I mean the attachment you added to your post here :)
Its empty.

Maybe try zipping the file first?
0
SteveL13Author Commented:
Anders,  New files attached including the signature file.  Please select "Alfred Moore" from the combo box.  His signature should then appear in the field below the combo box.  

Hope you can make this work.  I'm sure lost.
Example.accdb
Alfred-Moore.jpg
0
Anders Ebro (Microsoft MVP)Microsoft DeveloperCommented:
I've made some edits, and it works now.

Most notably, I removed the signature attachment field from the primary table. Unless you want to COPY the signature, the signature field should not be there. It is breaking the rules of normalization (Which can be ok, if you have the right reasons for it)

Try to look at the query, to see how the signatures make their way into the form.
TSC.zip
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SteveL13Author Commented:
Thank you very much.  Works perfectly.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

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.