Link to home
Start Free TrialLog in
Avatar of Mohamed Singh
Mohamed Singh

asked on

Taking a Picture with MS WIA

Hi,

Using WIA (or it's replacement), how can I take a picture and show this in an MS Access form and report ?
imgPic on frmPictures has tblPictures.PicFilePathAndName as its control source.

Your assistance is greatly appreciated.

Kind Regards,
Mohamed
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Rather than deal with low level WIA calls, you might want to purchase a control:

http://www.ammara.com/support/samples/access-wia-camera-control.html

Jim.
and by the way, depending on what your doing, dealing with the WIA object library directly may not be all that hard.  For example, it might be as simple as this:

Dim commondialog1 As Object
Dim img As ImageFile
Set commondialog1 = CreateObject("wia.commondialog")
Set img = commondialog1.ShowAcquireImage

img.SaveFile ("c:\test.jpg")

Jim.
I should add that on that link in the first comment, look at the very bottom and view the sample code for frmCapture

Some of it involves dealing with their control, but a lot of it shows you how to work with the WIA lib.

Jim.
ASKER CERTIFIED SOLUTION
Avatar of Nick67
Nick67
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
He just said he wanted to take a picture...not sure it will be from a webcam.

Jim.
@Jim
:)
He's read my WIA articles and asked for this in an unrelated Q
https://www.experts-exchange.com/questions/28566220/Ms-Access-Search-for-text-in-a-Memo-Fied.html
The phrasing there was using WIA to take a pic (using an attached camera/webcam)

Way back, I worked with point-and-shoots that, when jacked in with USB, could be triggered to take a picture.
None of the point-and-shoots in the outfit now (various models of Canon PowerShots) have that ability anymore.
Do you know of any?
Avatar of Mohamed Singh
Mohamed Singh

ASKER

Hi Nick67,
Thank You for your efforts, your contribution and for sharing your hard work.
Kindest Regards,
Mohamed
Hi Jim,
Thank You for participating.
I will definitely keep DBPix in mind.
Kind Regards,
Mohamed
@Mohamed.

Your welcome.  I hope it serves the purpose.

Nick67