Scan a file and save to existing record in Access Database

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

Who is Participating?
Alan WarrenApplications DeveloperCommented:
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.Action = acOLEInsertObjDlg
End Sub

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

Alan :)

jeffravenAuthor Commented:
blimey that what quick...

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

thanks kindly

Alan WarrenApplications DeveloperCommented:
Glad you got it happening Jeff, good one!

Alan :)
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

jadedataMS Access Systems CreatorCommented:
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.

EE Cleanup Volunteer
jeffravenAuthor Commented:
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

jadedataMS Access Systems CreatorCommented:
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.
jeffravenAuthor Commented:
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

Alan WarrenApplications DeveloperCommented:
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:
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.


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
jadedataMS Access Systems CreatorCommented:
alan: been there...
jadedataMS Access Systems CreatorCommented:
A Moderator will be by later to make the final call on the question.
jeffravenAuthor Commented:
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....

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.