Solved

Scan a file and save to existing record in Access Database

Posted on 2003-12-10
13
425 Views
Last Modified: 2008-03-06
I need help understanding how to scan an image, then save this file to a record in my database, or better still, the ability to open an existing record, and then scan an image to add to this record. How is this done, and is there any s/w available (cheaply!) that I can add to my Access Database that will do this for me?

any help will be greatly appreciated

0
Comment
Question by:jeffraven
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
13 Comments
 
LVL 26

Accepted Solution

by:
Alan Warren earned 250 total points
ID: 9911352
Hi jeffraven,

Create a new table called YourTable
Create a field in your table called oPic of type OLE Object and another field called ID of type autonumber.
Create a new AutoForm and using YourTable as the source.
Save the form then open it in design view.
Add a new command button called btnScan
View properties for btnScan
Give the command button an OnClick event [Event procedure]
Click the build button alongside the onclick event to open the code window looks like [...],
Paste this code into the code window for the btnScan on Click event

Private Sub btnScan_Click()
  Me.oPic.SetFocus
  Me.oPic.Action = acOLEInsertObjDlg
End Sub

When you click the button the Insert Object  Dialog will appear, choose Microsoft Photo Ed Scan from the list.

Alan :)




0
 

Author Comment

by:jeffraven
ID: 9911677
blimey that what quick...

have tested your solution and all works fine.................
I shall award you your points

thanks kindly

Jeff
0
 
LVL 26

Expert Comment

by:Alan Warren
ID: 9916746
Glad you got it happening Jeff, good one!

Alan :)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 32

Expert Comment

by:jadedata
ID: 10271996
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: alanwarren {http:#9911352}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jadedata
EE Cleanup Volunteer
0
 

Author Comment

by:jeffraven
ID: 10272047
unfortunately although it appeared that the solution from alanwarren was successful, it turned out to be the contrary.

I have now resolved the issue by outsourcing to a contractor

0
 
LVL 32

Expert Comment

by:jadedata
ID: 10273439
unforturnately you claimed it worked and failed to return to recant the claim.
I am certain that if you had returned to continue alanwarren would have ably and readily assisted you.

I get the action that alanwarren states would occur.
0
 

Author Comment

by:jeffraven
ID: 10278881
unfortunately time was against me, and the contractor issue just came along by chance, so i took it. Indeed if I had of had more time then I would have cotinued with alanwarren and no doubt inevitably came up with the solution as is normally the case with the site

jeff
0
 
LVL 26

Expert Comment

by:Alan Warren
ID: 10279174
Hi jeff,

yeah, there is no way to address the acOLEInsertObjDlg dialogue programatically, except to invoke it, bummer.

Do a lot of scanning stuff here,  
I get the scanners to save to wherever is their default save location. I give the users of the access app a browse for scanned files form that prompts for location, the location is preserved in windows registry, so my attach scanned files dialogue always opens at previous selected dir. Then I invoke a sub to do a binary read on the files that the user selects in the dir so I can append them as Binary Long Objects in tables in the connected data source.

I find this to be the most efficient method of managing large amounts of raw binary data.

If you are interested I have a page on Using BLOB's with microsoft access here: www.cashoz.com/samples/blobs.asp 
http://www.cashoz.com/samples/blobs.asp
The sample download is fairly basic, I have since modulised this functionality.
The code I originally posted here served me well for a number of years, but as the business grew so did the need for further automation, I guess it all depends on the gettin on point.
I'm currently looking for a solution to read a binary stream from a table field and displaying it on a web-page without writing it to disk. hmmm. Any ideas how to achieve this would be welcomed. Apparently dotnet can do it, no problem, huh.


Jack,

sorry I didn't get back to you this mornin, I've had my head in the sand for a couple of days, deployment woes and glitches, ya know, everything is super urgent mode, after you've been bullied into deploying (ready or not)



Alan warren
0
 
LVL 32

Expert Comment

by:jadedata
ID: 10280295
alan: been there...
0
 
LVL 32

Expert Comment

by:jadedata
ID: 10280311
A Moderator will be by later to make the final call on the question.
0
 

Author Comment

by:jeffraven
ID: 10337190
i appreciate your fairness in this matter.

Like I said, if I had had more time, I would have pursued wth alan and no doubt would have came up with a workable solution....

thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question