Solved

Scan a file and save to existing record in Access Database

Posted on 2003-12-10
13
393 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
  • 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
 
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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now