[Last Call] Learn how to a build a cloud-first strategyRegister Now


Image Capture in an Access Form

Posted on 2005-04-20
Medium Priority
Last Modified: 2008-02-01
I am trying to consolidate all the little applications my company has acquired over the years that deal with employee information. I have managed to tie time tracking, training, building access, and personnel records to a central database but there is still one separate application that is causing me trouble.

We have an off-the-shelf program that takes the employees photo and generates an ID badge. The badge is coded for building access. The problem with this program is that the database is not linkable in any way helpful to me.

I have all the needed data in the central database, including a field named “photo” that contains the name of the jpg bitmap for each person. I have found a few badge making applications that let me print the badge using my database as a reference. One problem remains:

I have no clean way to photograph the employee and save the bit map where it belongs. I am looking for something that would keep this whole process flowing easily for our HR department so they don’t have to become computer experts to add a picture. What I envision is something like an Access form that shows the live USB video feed on the left and a resulting still on the right that occurs when they click a button. If the picture is acceptable they click another button and the bitmap is saved in the right location with the right file name. This form could just become part of the employee information entry procedure. A separate program that does that job would work as well. I could call it from a form.

Sorry for the long winded explanation. I figured the best way to get results is to make the whys and where clear to everyone. I am open to any and all suggestion that accomplish the above.

Points go to the person who points me in a direction that leads to solving my problem. If anyone has the actual solution they can offer, the points will be doubled.

Thank you;
Question by:RandyTippetts
  • 2
  • 2
LVL 36

Accepted Solution

SidFishes earned 1000 total points
ID: 13826246
LVL 44

Expert Comment

ID: 13826297
save the Picture file ANYWHERE on DISK (do not, repeat NOT, store the JPG files in the database itself).  What you save in the employees record in the database is the PATH to the JPG file, not the file itself.

You can then load the JPG into an Image control on a form, using the path to the file, as retrieved from the employee record.

If you need more explanation, just ask.


Author Comment

ID: 13826375

Saw that before posting. It looked a little over my head. I take a closer look at the links.

Arthur Wood;

I have that part nailed. The photo field just contains the name of the bitmap. The form works fine on people with current pictures. I am trying to find a better way to add new pictures or change existing.
LVL 36

Expert Comment

ID: 13827465
this is really quite simple

Get the file from shrinkwrapvb
unzip file

open a new form

goto the code page, tools > references , register the ocx's (the rest of the files in the zip are inrelevant unless you have VB)

place a vbVidC60.ezVidCap Control on your form (from the More Controls button on your tool bar)

Name the control Vid

create a button

Private Sub Capture_Click()
Me.Vid.SaveDIB "C:\test.dib"
End Sub

then write some code to insert

strSQl = "Insert Into MyTable (ID, CapPath), values (me.SomeID, "C:\test.dib")
execute...blah blah

obviously you'll want to think about naming of the file

you could have multicapture and autorename
Public FilePad
Private Sub Capture_Click()
If IsNull(filePad) Then
   filePad = 1
End If
Me.Vid.SaveDIB "C:\Pic_" & filePad & ".dib"
filePad = filePad + 1
End Sub

or some input

Private Sub Capture_Click()

CapName = inputbox ("Please Enter CapName")

Me.Vid.SaveDIB "C:\ & CapName & ".dib"


and there's a lot more you can do with the ocx like set input source, output, capture audio and more...

but that's the basics...


Author Comment

ID: 13829241
Thanks all;

SidFishes had me look deeper into a prior post. The links in that post did start me in the right direction. I haven't gotten it seamless yet but I am well on the way to a useable workaround. I will play with your codes suggestions "SidFishes" when I have gotten them online.

Thanks again.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question