Draw on a form? (1 Viewer)

Gasman

Enthusiastic Amateur
Local time
Today, 09:20
Joined
Sep 21, 2011
Messages
14,037
Are you getting an error? What version of Access are you using? Thanks!
No, it is just my Access is so old. :) It happens a lot to me. I always get unrecognised DB format.
 

ahmed_optom

Registered User.
Local time
Today, 09:20
Joined
Oct 27, 2016
Messages
93
Hi. Just curious, could you please test this out for me and let me know if you see the same problem? Thanks!


Hi Dbguy,

The left hand side "display signature using an image file" the signature box is blank.
On the right it works, the one using an attachment field.

Also, im not actually able to sign anything....

Edit :

I can, it seems to work, just needed to make sure it was in a trusted folder , my bad !
 
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Today, 02:20
Joined
Oct 29, 2018
Messages
21,357
Hi Dbguy,

The left hand side "display signature using an image file" the signature box is blank.
On the right it works, the one using an attachment field.

Also, im not actually able to sign anything....

Edit :

I can, it seems to work, just needed to make sure it was in a trusted folder , my bad !
Hi. Thanks for trying. Hope it helps with your current project. Please let me know if you have any questions about using it. Good luck!
 

isladogs

MVP / VIP
Local time
Today, 09:20
Joined
Jan 14, 2017
Messages
18,186
@theDBguy
Both your app and mine work perfectly for creating and saving a signature
The error that @ahmed_optom mentioned was with code used to retrieve a saved signature file.
No idea yet why that's now an issue (but only after the first time it is clicked)

As far as I can tell, you don't have an equivalent of that functionality in your example app.
Can you confirm whether that is the case.

@ahmed_optom
I thought you wanted to draw on a form. Did you actually want to save signatures?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:20
Joined
Oct 29, 2018
Messages
21,357
@theDBguy
Both your app and mine work perfectly for creating and saving a signature
The error that @ahmed_optom mentioned was with code used to retrieve a saved signature file.
No idea yet why that's now an issue (but only after the first time it is clicked)

As far as I can tell, you don't have an equivalent of that functionality in your example app.
Can you confirm whether that is the case.


@ahmed_optom
I thought you wanted to draw on a form. Did you actually want to save signatures?
@isladogs Hi Colin. I don't have a "retrieve" button on my demo because I automatically display the saved signature using the Form's Current event. So, in effect, I also have a "retrieve" functionality in my demo, but it's sort of automatic - no need to click a button.

I think the difference between the approach I'm using is I decided to use two different field data types to store the captured signature image in my demo (Memo and Attachment) rather than the one you're using (OLE Object). That's why I am not getting the same error, because I am not using the Load method, like you're doing. Instead, I am extracting the signature image to a local file (GIF) and then assign it to the Image Control. I'm not sure if that's any better. I just know it doesn't suffer from the same error.

Hope that makes sense...
 

ahmed_optom

Registered User.
Local time
Today, 09:20
Joined
Oct 27, 2016
Messages
93
@theDBguy
Both your app and mine work perfectly for creating and saving a signature
The error that @ahmed_optom mentioned was with code used to retrieve a saved signature file.
No idea yet why that's now an issue (but only after the first time it is clicked)

As far as I can tell, you don't have an equivalent of that functionality in your example app.
Can you confirm whether that is the case.

@ahmed_optom
I thought you wanted to draw on a form. Did you actually want to save signatures?

Yes, I just wanted to save signatures. Which I think I have a good implementation now thanks to this thread.

The method of "retrieving" in DBGuy's example is outputting the file and then loading that image the control.

The issue I have with DBguys method, is potentially losing control of the file, eg whilst the form is open someone in theory could copy the image file. I may be over thinking it, but Im just working on a way today to try and bypass the output of the file, so there is no possibility of someone "taking" the signature.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:20
Joined
Oct 29, 2018
Messages
21,357
Yes, I just wanted to save signatures. Which I think I have a good implementation now thanks to this thread.

The method of "retrieving" in DBGuy's example is outputting the file and then loading that image the control.

The issue I have with DBguys method, is potentially losing control of the file, eg whilst the form is open someone in theory could copy the image file. I may be over thinking it, but Im just working on a way today to try and bypass the output of the file, so there is no possibility of someone "taking" the signature.
Hi. I do think you may be over thinking it, because the file is created and deleted in a split second. The chances of someone intercepting it would be very small. Besides, who do you think will try to "steal" the signature? Remember, anyone with access to the table's data, can take a copy of the signature data or the whole thing. If you're really concerned about the image file being stolen in that very narrow window of time, then perhaps you can change the code to create the image file in a network location that no one knows. Hope that helps...
 

ahmed_optom

Registered User.
Local time
Today, 09:20
Joined
Oct 27, 2016
Messages
93
Does anyone know how to load a background picture, and then have the ability to "draw" on it?

Im thinking of using the inkpicture control, I can set it up to catch the drawing, but I cant seem to load a background image , any ideas?

thanks in advance
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:20
Joined
Oct 29, 2018
Messages
21,357
Does anyone know how to load a background picture, and then have the ability to "draw" on it?

Im thinking of using the inkpicture control, I can set it up to catch the drawing, but I cant seem to load a background image , any ideas?

thanks in advance
Hi. My demo converts the signature (ink image) into gif and converts it back to display in an ink control. If you use a gif image for your background, or convert it to a gif, then maybe you can try my demo.
 

ahmed_optom

Registered User.
Local time
Today, 09:20
Joined
Oct 27, 2016
Messages
93
Hi. My demo converts the signature (ink image) into gif and converts it back to display in an ink control. If you use a gif image for your background, or convert it to a gif, then maybe you can try my demo.

Hi Db guy,

Hope your well.

The issue is that your displaying the ink picture in an image control. This I can do. But I want to display the picture in an inkpicture control, and then I can draw ontop of the picture. This is the problem.

I cant see to find a inkpicture.backgroundpicture type of property that will let me set it and then i can draw on top.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:20
Joined
Oct 29, 2018
Messages
21,357
Hi Db guy,

Hope your well.

The issue is that your displaying the ink picture in an image control. This I can do. But I want to display the picture in an inkpicture control, and then I can draw ontop of the picture. This is the problem.

I cant see to find a inkpicture.backgroundpicture type of property that will let me set it and then i can draw on top.
Hi. In that case, maybe Colin's Load method could work for you. Have you tried it?
 

ahmed_optom

Registered User.
Local time
Today, 09:20
Joined
Oct 27, 2016
Messages
93
Hi. In that case, maybe Colin's Load method could work for you. Have you tried it?
yes, I have been playing with it for hours. His method now also rte. I believe something in access or vba changed over the years that means the code is no longer correct.

Dim v As Variant
Dim b() As Byte
Set v = Me.InkPicture6
b = Nz(Me.Signature.Value, "")
' b = Nz(DLookup("Signature", "tblSignatures", "CustomerID = " & Me.CustomerID), "")
' Debug.Print b
v.Ink.Load b ' here is where it stops - rte -2147024809 80070057 you entered an expression that has an invalid reference to the property |.
Me.InkPicture6.Requery

Set v = Nothing
 

Users who are viewing this thread

Top Bottom