Is it possible to insert a box of some sort in an Access form that will allow someone to draw an object with a stylus or with their finger? The drawing object would need to be stored as part of data in the form.
Is it possible to insert a box of some sort in an Access form that will allow someone to draw an object with a stylus or with their finger? The drawing object would need to be stored as part of data in the form.
99.95% No
0.05% is reserved because I never say never.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Since this code can be run on Internet Explorer:
Then it can be done with the browser control. I grabbed that code from https://codepen.io/nDav/pen/xGBBVWCode:<!DOCTYPE html> <html> <head> <style> body { background: #e74c3c; } #canvas { position: relative; left: calc(50% - 390px); top: 50px; border: 1px dotted black; cursor: crosshair; background: #ecf0f1; } </style> <script> var canvas; var context; window.onload = function() { canvas = document.getElementById('canvas'); context = canvas.getContext('2d'); canvas.width = 780; canvas.height = 490; context.strokeStyle = "#913d88"; context.lineWidth = 2; canvas.onmousedown = startDrawing; canvas.onmouseup = stopDrawing; canvas.onmousemove = draw; function startDrawing(e) { isDrawing = true; context.beginPath(); context.moveTo(e.pageX - canvas.offsetLeft, e.pageY - canvas.offsetTop); } function draw(e) { if (isDrawing == true) { var x = e.pageX - canvas.offsetLeft; var y = e.pageY - canvas.offsetTop; context.lineTo(x, y); context.stroke(); } } function stopDrawing() { isDrawing = false; } } </script> </head> <body> <canvas id="canvas"></canvas> </body> </html>
I believe you can. I seem to recall @isladogs produced something to do that.
Found it.
https://isladogs.co.uk/signature-capture/index.html
Last edited by Welshgasman; 04-24-2023 at 07:47 AM.
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
You can indeed do this within Access, either to insert a signature, enter text by hand or indeed as an Etch a Sketch!
No need to use a browser control for this purpose.
See the link to my article that @Welshgasman posted above.
Good job @Micron reserved 0.05% for doubt!
I learn something new each day. Too bad it doesn't seem to be something I can recall tomorrow.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
I have older laptop without touch screen. Mouse can write in box but of course result is less than ideal. Doesn't seem to be a USB or wireless stylus as input device (like a mouse) for non-touch screen. Would have to connect a drawing tablet for input by stylus. Lowest price I see on Amazon is 16.99.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
DBG has one too http://www.accessmvp.com/thedbguy/demos/signature.php
If this helped, please click the star * at the bottom left and add to my reputation- Thanks