> If scanner is twain complient you can use VB/VBA to control it.
>
[quoted text clipped - 19 lines]
> >
> > Thanks in advance
Pete if you are out there, or any one who can help. I have the scanner
working, but I get an error when I try to save the image to a folder within a
folder on my hard drive. If I only use one folder it works OK. But I really
need to save to a folder within a folder. Here is the code I'm using.
Thanks in advance for help.
Images = folder 1 and PTfolder = folder 2
strFile = "c:\Images\PTFolder\" & [PTName] & [ID] & [LblImage] & [Date]
strType = "bmp"
A = Scanner1.Save(strFile, strType)
If A = 1 Then
MsgBox "Save " + strFile + "." + strType + " Complete"
Else
MsgBox "Save fail"
End If

Signature
AccessRAM
> Pete thank you, I will work with the products and the attachment code and let
> you know how it comes out.
[quoted text clipped - 24 lines]
> > >
> > > Thanks in advance
Pete D. - 28 Mar 2008 22:46 GMT
My suggestion is to use a save box. http://www.mvps.org/access/ provides
the code for saving but if you want to hard code it you need to debug your
code. I think if you display in debugger each part of c:\Images\PTFolder\"
& [PTName] & [ID] & [LblImage] & [Date]
you will find you need to add & "\" or a "." to dig down.
> Pete if you are out there, or any one who can help. I have the scanner
> working, but I get an error when I try to save the image to a folder
[quoted text clipped - 50 lines]
>> > >
>> > > Thanks in advance
RAM - 29 Mar 2008 02:22 GMT
I tried this:
c:\Images.PTFolder\" & [PTName] & [ID] & [LblImage] & [Date]
But it goes to the C drive not the folders.
I then tried:
"c:\BobImages.PTFolder\" & [PTName] & [ID] & [LblImage]
and the image save failed.
I tried:
strFile = "c:\BobImages\.PTFolder" & [PTName] & [ID] & [LblImage]
and the image goes to the file BobImages.
I still can not get the second file folder open.
Any other suggestions.
Thanks
Bob

Signature
AccessRAM
> My suggestion is to use a save box. http://www.mvps.org/access/ provides
> the code for saving but if you want to hard code it you need to debug your
[quoted text clipped - 55 lines]
> >> > >
> >> > > Thanks in advance
Pete D. - 29 Mar 2008 15:11 GMT
First off We need to know what you are really creating.
Open up the debugger and at the top of your code add something like
Dim strMyNewFile as string
then put
strMyNewFile = "c:\Images\PTFolder\" & [PTName] & [ID] & [LblImage] & [Date]
Then select strMyNewFile right click and add a watch. Click to the left of
it on the border wich will put a red dot on border. This is now a break
point, your code will stop there. Run you application, when it stops press
F8 once. At the bottom of the screen look and see what the watch sees in
strMyNewFile, once you can see what you created you can edit the string to
correct it. Also I don't understand the period in you string between
Images.PTFolder. It appears you just don't have a valid file/path string.
Once you get that right pass the strMyNewFile to the file name instead of
the string. Easier to find your problem with your
>I tried this:
> c:\Images.PTFolder\" & [PTName] & [ID] & [LblImage] & [Date]
[quoted text clipped - 84 lines]
>> >> > >
>> >> > > Thanks in advance
Pete D. - 29 Mar 2008 20:24 GMT
Solution worked out
strFile = "c:\BobImages\" & [PTFolder] & "\" & [PTName] & [ID] & [LblImage]
& " " & Format([LblSDate], "dd mmm yyyy")
Fixed quotes and format of date.
> First off We need to know what you are really creating.
> Open up the debugger and at the top of your code add something like
[quoted text clipped - 106 lines]
>>> >> > >
>>> >> > > Thanks in advance