Re: Embed Signature Command
- From: "Aaron Erickson" <AAErickson@xxxxxxx>
- Date: Tue, 12 Jun 2007 07:46:52 -0600
How about changing your tactics a bit? Even though your png files may be
small, your database will grow extensively as you add more pictures to it.
What you could do instead is store a table, say tblSignature, in the
database backend (since you have several users I'm assuming you have a
common datafile). The table would contain each users WindowsUserName along
with their signature picture. You could even create an upload signature
form or something of that nature. Now rather than storing a picture in each
field you want to be "signed" by them, you could instead just store their
WindowsUserName in that field instead. You can grab a windows user name by
creating a module and inserting this code:
'----------------------------------------------------
Option Explicit
Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _
(ByVal lpBuffer As String, nSize As Long) As Long
Function WindowsUserName() As String
Dim sBuffer As String * 255
Dim lStringLength As Long
lStringLength = Len(sBuffer)
GetUserName sBuffer, lStringLength
If lStringLength > 0 Then
WindowsUserName = Left$(sBuffer, lStringLength - 1)
End If
End Function
'---------------------------------------------------
Of course this is assuming that your users have distinct WindowsUserNames.
Now on the form or report where you want to show the signature, you simply
just have to use a bound image control referencing the username in
tblSignature. I hope I have given some helpful advice.
"Bayou_Bob via AccessMonster.com" <u34974@uwe> wrote in message
news:7395cff5f9edb@xxxxxx
I've developed a form and corresponding report using ACCESS 97. There are
several locations on the form that I want to create a "Sign" command
button
(one button for each location) to insert an electronic signature. Each
user
of the form has been instructed to store a "Signature.png" file at a
common
location (C:\Data\Signature.png) on their computer that contains their
signature which was captured using the Note Pad feature on a PDA. The
database will be shared among several users that belong to a common
network,
so as each user completes their part of the form, they will insert their
electronic signature.
I need help on how to code the "Sign" command button to embed their
signature
in a field that will be visible, stored with each corresponding record and
printable with the report. I've read the concerns about bloating the
database with images, but the "Signature.png" files are very small and I
need
to store them with the database.
If possible, I'd also like to include an error trap that would pop up a
message if the "Signature.png" file is missing.
Thanks in advance for all the help,
Bayou Bob
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200706/1
.
- Follow-Ups:
- Re: Embed Signature Command
- From: Bayou_Bob via AccessMonster.com
- Re: Embed Signature Command
- References:
- Embed Signature Command
- From: Bayou_Bob via AccessMonster.com
- Embed Signature Command
- Prev by Date: Re: forcing sounds to play
- Next by Date: Need help setting up a complex row source
- Previous by thread: Embed Signature Command
- Next by thread: Re: Embed Signature Command
- Index(es):
Relevant Pages
|