Question Webcam controller for capturing pictures

nagarjuvnc

New member
Local time
Today, 05:20
Joined
Nov 27, 2018
Messages
9
Hello every one.
I am new to this forum.
I want a help about the following topic
I have made an access project in Microsoft access 2003
Operating system is Windows 10 64 bit
I want capture pictures from a web cam from ms access forms and save it to desired folder.

With the following code I succeeded in Operating System Windows XP. Private Sub btnTakePicture_Click()
Dim tempfile As String
Dim mydevice As WIA.Device
Dim item As WIA.item
Dim imfile As WIA.ImageFile
'Dim Commondialog1 As WIA.CommonDialog
fileName = Loantype & AccountNumber & ".jpg"
tempfile = "D:\P" & fileName 'put the path and name for the location of your temp file here.
'the next 4 lines deletes the old temp file if it exists
Set filesystemobject = CreateObject("Scripting.FileSystemObject")
If filesystemobject.FileExists(tempfile) Then
Kill (tempfile)
End If
'Set Commondialog1 = New CommonDialog
Set imfile = CommonDialog4.ShowAcquireImage

If imfile Is Nothing Then
'MsgBox "Action aborted"
Else
imfile.SaveFile (tempfile) 'this line saves the picture to a specified file
Me.Image1.Picture = (tempfile) 'this sets the picture on the form to show the new picture
End If
Exit_btnTakePicture_click:
Set mydevice = Nothing
Set item = Nothing
Exit Sub
Err_btnTakePicture_click:
MsgBox Err.Description, vbOKOnly + vbCritical, "Error Taking Picture"
Resume Exit_btnTakePicture_click
End Sub

Present in this OS Windows 10, I am unable to run this code
Please help me
 
Welcome to AWF.

You need to explain exactly what happens and where it fails.

I'm guessing that it fails on Common Dialog which IIRC isn't installed with Windows 10 and doesn't run in 64-bit Windows
 
Thank you quick response sir
Exactly the problem is common dialog class
Can I run it in Windows 7 32bit
 
Webcam control with Ms access forms 2003

Hello everyone
I want to make a form to capture picture from a webcam and save it to a destination folder using vba code.
I mean webcam controller in Ms access forms 2003
I am using Microsoft office 2003
Operating system window 7
Please help me
Thanks in advance.

EDIT: by Isladogs
I have moved this separate thread to here as its essentially the same question again.
 
Last edited by a moderator:
Sir Same Error in Ms Access 2003 & Windows 7 32 bit
Error is "There is no object in this control"
Error with common dialog class
Please help me
 

Users who are viewing this thread

Back
Top Bottom