Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Scan a file and save to existing record in Access Database

Posted on 2003-12-10
13
Medium Priority
?
443 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 1000 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

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.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

721 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