473,505 Members | 15,036 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Viewing scanned documents in access

4 New Member
I would like some advice on how to link scanned documents to specific records in microsoft access
May 11 '07 #1
9 7578
JConsulting
603 Recognized Expert Contributor
I would like some advice on how to link scanned documents to specific records in microsoft access
1) What kind of documents are they? PDF?
2) When you say link..you mean put the path in a field in the table so you can click it and it will open the document?
3) How do you plan to help your user to get the path in the field?

you can set up a field in a table as hyperlink. A path like C:\myfile.pdf when clicked on will open the PDF as long as you have an acrobat viewer installed. This works for most file types known to MS (as long as you have the supporting software to open them)

J
May 12 '07 #2
ussha
4 New Member
I want to link a specific value in a field to a PDF file that is named the same as the value in the field. So each entry for that field will bring up a different image. This is my first time posting and I don't have a programming background so I am struggling a little on this one.
May 14 '07 #3
JConsulting
603 Recognized Expert Contributor
I want to link a specific value in a field to a PDF file that is named the same as the value in the field. So each entry for that field will bring up a different image. This is my first time posting and I don't have a programming background so I am struggling a little on this one.
So you don't want to open the PDF, you want to display it in a form or something?
May 14 '07 #4
ussha
4 New Member
So you don't want to open the PDF, you want to display it in a form or something?
Yes, that's what I'm after displaying the image in the form. Not sure how to go about it though
May 15 '07 #5
JConsulting
603 Recognized Expert Contributor
Yes, that's what I'm after displaying the image in the form. Not sure how to go about it though
Morning,
In access, there is an object on the menu that allows you to insert an image. Without stating the obvious, this is an image control. The image control has a property that can be assigned to a control source.

Initially, the easiest thing to do is select the control off the menu. Create one on your form. A wizard will open up allowing you to select your image file. Select one.

Once you get the image control on the form, you can assign it a field in your underlying table.

Your table should hold a path to your images. Normally this path is either the same directory as the one where you plan to install your database, or a subfolder of it. This is for ease of use.

A text field in your table would then hold that path.
example: C:\MyDatabaseLocation\Images\Image1.bmp

Then using the form's On_Current event you assign the image control the value in that text field.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2. Me.ImageControl.Picture = Me.MyImagePath
  3. End Sub 
  4.  
J
May 15 '07 #6
JConsulting
603 Recognized Expert Contributor
Yes, that's what I'm after displaying the image in the form. Not sure how to go about it though
your other option, if you don't have images of your pdf documents, is to display them in an unbound OLE object. Below is an example of the types of files you can display in various "frames"

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2. ' OleUnbound11 is an unbound Object Control. It's properties allow you to do the following.
  3. Dim OLEType As String
  4. OLEType = Right(Me.MyOLE, 3)
  5. Select Case OLEType
  6. Case "pdf"
  7. 'Me.OLEUnbound8.SourceItem = Me.MyOLE
  8.     Me.OLEUnbound11.Class = "AcroExch.Document"    ' Set class name. if you leave the version out...it defaults to the latest
  9. Case "bmp"
  10.     Me.OLEUnbound11.Class = "Paint.Picture"    ' Set class name. if you leave the version out...it defaults to the latest
  11.     ' Adjust control size.
  12.     'Me.OLEUnbound11.SizeMode = acOLESizeStretch
  13.     Me.Image0.Picture = Me.MyOLE ' This is an Unbound Image frame..Works differently than an object frame
  14. Case "xls"
  15.     Me.OLEUnbound11.Class = "Excel.Sheet"    ' Set class name. if you leave the version out...it defaults to the latest
  16.     ' Specify data to create link to.
  17.     Me.OLEUnbound11.SourceItem = "R1C1:R5C5"  '<---set the range to what you want to see
  18. End Select
  19.     ' Specify type of object.
  20.     Me.OLEUnbound11.OLETypeAllowed = acOLEEither
  21.     ' Specify the verb action
  22.     Me.OLEUnbound11.Verb = acOLEVerbOpen ' -2 = acOLEVerbOpen
  23.     ' Specify source file.
  24.     Me.OLEUnbound11.SourceDoc = Me.MyOLE  '<----My field
  25.     ' Specify data to create link to.
  26.     Me.OLEUnbound11.Action = 0 ' 1 = acOLECreateLink, 0 = acOLECreateEmbed
  27.     ' Adjust control size.
  28.     Me.OLEUnbound11.SizeMode = 1  'acOLESizeClip (0), acOLESizeStretch (1), acOLESizeZoom (3)
  29.     Me.Dirty = False
  30.     Me.OLEUnbound11.Requery
  31.     Me.Refresh
  32. End Sub
  33.  
May 15 '07 #7
ussha
4 New Member
thanks i'll give it a go
May 17 '07 #8
tokoloshi
3 New Member
I need to embed a PDF file into my DB. Based on the client's business rules I cannot maintain the document outside of the DB. I cannot therefore link to a given location outside of the database.

The code that I am using, which I have confirmed from several different sites, is as follows:

------- Code used ----------------------------------------
varFile = "C:\PDFForms\ImportedFile.pdf"

On Error GoTo Error_cmdOleAuto_Click
Forms![PDFForm]![DocTypeID] = 13
Forms![PDFForm]![DocSubject] = "My new PDF document"
With Forms![PDFForm]![embeddedDoc]
.Enabled = True
.Locked = False
.OLETypeAllowed = acOLEEmbedded
.Class = "AcroExch.Document"
.SourceDoc = varFile
.Action = acOLECreateEmbed <-- Error generated here
End With
DoCmd.RunCommand acCmdSaveRecord

----------- Errors received --------------
?cstr(err)
2777

?Err.Description
The class argument in the CreateObject function of the Visual Basic
procedure you're trying to run is invalid.
---------------------------------------

I receive the listed errors when running this code.

All of the examples listed on all of the searches I have performed so far point me to the use of a .JPG or other image. These work comfortably, but the PDF file gives problems.

I have tried ignoring the .CLASS argument, but it still returns errors.

There are a heap of other discussions, but most tend to recommend saving the document outside of the DB.

Has anyone solved this problem yet?

Can someone please advise me on this one?
Dec 17 '08 #9
tokoloshi
3 New Member
btw: I am developing in Access 2007, with SQL Server 2005 as the Back End. The PDFs are created using the Office 2007 PDF/XPS add-in util from MS.
Dec 17 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1539
by: Joe | last post by:
Anybody ever figure out how to use a web page UI to allow someone to upload an image from a scanner? I understand you can scan a document, save it on the hard drive - then via the web UI you can...
4
2843
by: Kelly Bowles | last post by:
I have made a purchase requistion which I have been asked to put password protected copy of requestors signature. I am thinking that each signature will have to be scanned as a picture and linked...
1
3425
by: RAB | last post by:
I want to scan documents and then store them in an Access database. What file type would I want to scan the document as? Would I want to store the document file in the database or a path to the...
5
1289
by: aolson | last post by:
First of all i am pretty new to VB .NET as a whole so my answer may be silly as may my questions. Here is what i would like to do. I would like to open potentially multiple word documents for...
4
1479
by: N. Graves | last post by:
Thanks for reading my request for help! I have a Bound Object Frame that I have stored a Word Document. When I double click to view the document it is very small and unreadable. If I try to...
3
1692
by: tom.youdan | last post by:
Hi, I have created a database that is used to store contact information for NGO's accross India. It is simple in structure and I want a portion of the data to be viewable on the Internet. I...
34
1877
by: Alan Larsson | last post by:
Is there a way i can look at the php code that is runnig a site, without any ind of admin access to the server?
1
1780
by: amlcu2008 | last post by:
Dear friends i have a problem in storing Scanned documents into an oracle DB 10g i had downloaded the webutility package but dont know how to configure it also if any body can tell me what the data...
0
1410
by: Deceneu | last post by:
Hi everyone, this is my first post so please bear with me. I have the following situation: i have a local report that needs to have two "versions": one for viewing in the report viewer (with all...
0
7216
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7303
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7018
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5028
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4699
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1528
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.