Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 454
  • Last Modified:

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

0
jeffraven
Asked:
jeffraven
  • 4
  • 4
  • 3
1 Solution
 
Alan WarrenCommented:
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
 
jeffravenAuthor Commented:
blimey that what quick...

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

thanks kindly

Jeff
0
 
Alan WarrenCommented:
Glad you got it happening Jeff, good one!

Alan :)
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
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.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jadedata
EE Cleanup Volunteer
0
 
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

0
 
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.
0
 
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

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

thanks
0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

  • 4
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now