I
IT-1957
Good morning all:
I have this project where I have to take a picture of every order sent to
the customer. I have a database that track these Orders, the user scan the
order and the system mark it as completed. Now, The idea is to have a form
that promps the user to take the picture, (I have set uo a webcam that does
this,and create a floder on where these pictures are going to be stored, the
picture is taken by clicking a button on the camera, this places the pictures
on the specified directory)
I have this code:
Function Test()
Dim SourceFile, DestinationFile
SourceFile = "C:\Documents and
Settings\TR392\Desktop\APS_Picture_Project\WebCam\Picture 17.jpg" ' Define
source file name."
DestinationFile = "C:\Documents and
Settings\TR392\Desktop\APS_Picture_Project\Database\Test.jpg" ' Define
target file name."
FileCopy SourceFile, DestinationFile ' Copy source to target.
End Function
This code copy the Picture 17.jpg and save it as Test.jpg
The problem is that the webcam software names the next picture (i can not
change thhis) Picture 18.jpg , 19 , 20 etc...
How can I write the code so it takes any file name as the source? (and
prefereably to move or cut the file for the source to the destination?)
I also need to name the new file as one of the controls on my form(the order
id)
I'm adding a field with the path to this picture for future reference with
each Order.
Thank you for your help. I really appreciate it.
I have this project where I have to take a picture of every order sent to
the customer. I have a database that track these Orders, the user scan the
order and the system mark it as completed. Now, The idea is to have a form
that promps the user to take the picture, (I have set uo a webcam that does
this,and create a floder on where these pictures are going to be stored, the
picture is taken by clicking a button on the camera, this places the pictures
on the specified directory)
I have this code:
Function Test()
Dim SourceFile, DestinationFile
SourceFile = "C:\Documents and
Settings\TR392\Desktop\APS_Picture_Project\WebCam\Picture 17.jpg" ' Define
source file name."
DestinationFile = "C:\Documents and
Settings\TR392\Desktop\APS_Picture_Project\Database\Test.jpg" ' Define
target file name."
FileCopy SourceFile, DestinationFile ' Copy source to target.
End Function
This code copy the Picture 17.jpg and save it as Test.jpg
The problem is that the webcam software names the next picture (i can not
change thhis) Picture 18.jpg , 19 , 20 etc...
How can I write the code so it takes any file name as the source? (and
prefereably to move or cut the file for the source to the destination?)
I also need to name the new file as one of the controls on my form(the order
id)
I'm adding a field with the path to this picture for future reference with
each Order.
Thank you for your help. I really appreciate it.