I think one of the issues you're going to run into here is waiting for the
webcam software to do its thing before closing the record. Generally you are
best off if you keep the record 'edit' in as short of state as possible.
I'm not sure how (or if) access would communicate with the webcame software.
You could easily enough start the cam software using the Shell function from
a command button in access, and getting the file from a saved location after
is not too big of a deal either, but everything in between (the functions of
the webcam software that captures & stores the image) will be very difficult,
if not impossible to manage from access.
I would suggest one of two approaches here, depending on how you prefer to
work with data. If you don't have an issue saving an employee record without
the picture initially attached, provide the user with a button to retreive
the file after the cam software has saved it to a standarized location (with
a standardized name, so you can program access to find it).
Or, if you do not want the record part of your main dataset until the
picture is attached, utilize a table to hold temporary partially completed
records until the picture is finally attached, and then move that record into
your main dataset.
As far as how to start the webcam software, see the ShellExecute API from
mvps.org:
http://www.mvps.org/access/api/api0018.htm
This works like a charm for firing up external applications.
To store the picture, I would advise saving the filename & path in your
table rather than the image itself. This will keep sizing way down. Don't
use the hyperlink datatype, just regular text, and store the path to the
picture in the record. Then, you can have the user open the picture to view
it (again using the ShellExecute API), or you can link the filepath via an
image control directly into the report.
Its a little bit of work to set this up, but in the broad scope of things
shouldn't be too bad. Just keep in mind that access will likely have no
control over what the webcam software does, so don't depend on it. You will
probably have to manually set up the webcame software to save the file with a
name that access can find.
The Dir() function and FileCopy function will probably be common to a task
like this, so you may want to read up on those.
hth
--
Jack Leach
www.tristatemachine.com
- "First, get your information. Then, you can distort it at your leisure."
- Mark Twain