Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / March 2008

Tip: Looking for answers? Try searching our database.

Access 2007 Control of the attachment control and scanned data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RAM - 22 Mar 2008 21:24 GMT
I have a two part question:  First I have an attachment control that I would
like to use coding to regulate the attachments.  Each customer will have a
folder on the C drive with scanned images of various data.  The second part
of the question is can I control the scanner from access so it scans the
document to the associated client folder.  If this is the wrong place to ask
these questions please excuse me and if you could please point me in the
right direction.

Thanks in advance

Signature

AccessRAM

Pete D. - 23 Mar 2008 17:30 GMT
If scanner is twain complient you can use VB/VBA to control it.

http://www.dosadi.com/vbtwaincode.htm
http://www.softpicks.net/download.php?index=30951

For the attachment part see

http://blogs.msdn.com/access/archive/2007/08/24/adding-removing-and-saving-files
-from-the-new-attachment-field-in-access-2007.aspx


I haven't had a reason to do this yet but I looks pretty easy

>I have a two part question:  First I have an attachment control that I
>would
[quoted text clipped - 8 lines]
>
> Thanks in advance
RAM - 23 Mar 2008 22:09 GMT
Pete thank you, I will work with the products and the attachment code and let
you know how it comes out.

Once again thank you
Signature

AccessRAM

> If scanner is twain complient you can use VB/VBA to control it.
>
[quoted text clipped - 19 lines]
> >
> > Thanks in advance
RAM - 28 Mar 2008 00:39 GMT
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
RAM - 29 Mar 2008 15:56 GMT
Pete can you e-mail me at bob-pc@columbus.rr.com and I will send you a more
detailed example with some screen shots.  I'm sorry but I can't describe the
process as well in the discussion page.

Thanks

Bob
Signature

AccessRAM

> I have a two part question:  First I have an attachment control that I would
> like to use coding to regulate the attachments.  Each customer will have a
[quoted text clipped - 5 lines]
>
> Thanks in advance
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.