This is fast 2-minutes tutorial about working with images in Microsoft Access – a pleasant way of doing this. Actions taken here will cover most of your “imaging” needs.
You can see video version of this tutorial here.
1. Download control installer and run it.
2. Open MS Access and create a Blank Database.
3. Open Table1 in Design view and add Full name (Text type) and Picture (OLE type) fields.
4. Create form for Table1 and open it in Design view.
5. Delete ID and Picture fields presentation – we dont need em here.
4. Press Insert ActiveX Control button on the toolbar, select AccessImagine Picture Control and place it on the form.
5. Bind the placed control to an Image datafield.
That’s it ! Try it out, just to know how pleasant adding images to a database can be.
Notice that the ActiveX control have some useful options at Misc tab of the Property Inspector. You dont need it right now, but its nice to know that it is there. If you click on Custom […] sign, you will see a window with a quick reference about control’s properties and functions.
Here is the presentation of these steps:
great tool, but what about batch module for importing many images into database?
You can use simple VBA script for batch loading images, like:
For i = 1 To N
Pic.LoadFile (“c:\MyPics\” + Str(ID) + “.gif”)
DoCmd.GoToRecord , , acNext
Next i
This VBA script looks like it would do what I need. Would this go in a query or a macro on the database?
You need to add a button on Access form and paste the text above in its pressed event handler.
Once you press the button on form, the images will start loading.
How to use this visual basic .net with mysql as backend
Its simple, if you have all DB things done well. You just need to place AccessImagine control on form and bind it to database field. Read more here – http://access.bukrek.net/tutorial/dot-net
Great! Thanks for creating a great easy to use tool.
Hi Max really great work
I write e medical records and this is usefull tool to help. Since I print most of the reports from data form without creating the specific queries (e.g. =[Forms]![Otpust]![pr] for each field) it seems I can not print picture directly in the report from a form using this method. The only way I saw to bypass that is to create another field with preview and than read that field in a report as ole field, but it doubles the data. Is there any way arround this ?
I can’t understand your problems well.
Why you do not bind AccessImagine component to picture field in report as usual?
Thanks,
It Works Just Fine.
It Is Just easy and Perfect.
Love the creator
Hi Max, We have an accessdatabase with articles and articlenumber is a key fieed. Wa also have a directory with jpeg’s where the filenames are the same as the articlenumbers folowed by the jpg extention. How do we link them so that they appear in reports and forms? Thanks,
Kris
If you want to only show this pictures, you should make a query, where special string is composed, that contains the filename (number+.jpg). Link this field to AccessImagine object and specify StoragePath to the images location.
Dont forget to set HideButtons to “Yes” to avoid the image manipulations by user.
If you want the pictures to be manipulated by user, you should create picture filename field. It can be filled via simple query in your situation.
Great job!!! Really nice working. You solved my big problem in Access. Thank you.
Do you have anything similar that works with PDF files?
We don’t have PDF control at this time, but we are planning to develop attachment control soon.
hi max i use accessimagine in my vb.net it works fine but when i go back to first preview of picture, the picture is gone..
I don’t understand well your case, is it possible to explain better?
I did the download as a trial and really like it, although my db file size is increasing in proportion to the picture size linked in a different file – about 10mb for every 20 pictures. I was hoping to add about 1000 pictures a year -but I must be doing somethimng wrong. How do I keep the file size down? I have Access 2010. Thanks.
Thats ok, because images are stored in your DB. You can use external storage, if you expect high pictures amount.
Great tool, does amazingly well. I would like to hide the buttons on the control which is easy and have a button on the form that when pressed opens the scan window, is this possible?
I tried Scan as VBA and other simple strings but it doesn’t work.
Thanks
This is strange, Pic.Scan should invoke scanning dialog.
Can the image be saved into SQL Server Database?
Sure, AccessImagine works perfectly with SQL Servers.
when I use a local table this works properly but database is a split database where tables are stored on the server. If I try using the activeX control in this case, it gives me error “A call to an OS function error. would you please help.
Thanks in anticipation
I wanted to show another developer on my team your sample database from my machine. When I pass it to him he gets a compile error on startup that the ActiveX library reference is missing. Because the reference is missing, the auto-install script does not run. Can you explain how to get around this circular reference?
Thanks,
Chris
The whole auto-install script thing is not very stable. It behaves differently at different computers and Office versions.
Just install AccessImagine from this site manually.
hi, i tried the active x, its really good, however it uses the ole object, and pictures are then bound to records, which leads to inflation of the db size, is there a way to use hyperlinks, or pic path instead?
Yep, in many cases db size is vital.
AccessImagine includes great external image storage support. You just need to specify StoragePath and bind AccessImagine to some text field for filenames.
is there a way to capture the path of a selected image and put value in db?
No, selected image is copied into DB or external storage and original image path is not accessible.
will this work in Access 2010 and what procedures must one follow.
Sure, it works with Access 2010 the same way.
How do you change the default program to view the picture files. I played with your sample database and when I view the pictures, double click in the continuous form, it displays the pics in Microsoft Paint. I have played with it and can’t see how to do this. How would I change the default to Microsoft Picture Viewer? Thank you.
The default Windows program for that type of files is used. Just change the program that opens that files on doubleclick.
With a SQL Server backend, what data type needs to be the field on SQL Server to support the image?
Any of BLOB-type. VARCHAR(max) will go.
Fantastic! Very easy.
Thank God! Hadn’t been able to print employee IDs since converting to Office2010.
I need a program in 2007 that can add a captured webcam still to a form with name and address (like a badge) and allow save of the form as a jpg file. maybe save form view with print screen as jpg file. like to print one copy when the picture is taken.
can you refer me to someone who could do this?
You can create such a database in Access with AccessImagine.
Form with picture capture and info entrance, and a report with properly formed ID-cards.
Max, I have had your product for a few years and never really used it.
I can save my image and the file name, but I need it to return the “absolute file name” instead of just file name and extension.
Can this be done with maybe code?
Regards,
AccessImagine is supposed to copy images to designated external storage folder. Without this crop, paste, device acquire operations will be impossible.
Thats why you are not able to get original path to browsed image.
I’ll Change that, thx. Max……….
Super awesome almost, most important seems to work on windows 10, with no twain drivers.
I am have two issues:
1.I can’t seem to read images already in database (this is and upgrade).
2.I keep getting an error “JPEG error #53”, which could be why it doesn’t clear the image when I advance to next record (I confirmed that).
I will read more documentation see if I can see the problem.
i have many tables and form of that tables how i can save these pictures in table .i try it but when i capture pic in all form show same picture .so please tell me how i can save picture from access imagine properly .
but your work is really great.
Thank you! You need to bind AccessImagine to picture field. Check this tutorial – https://access.bukrek.net/tutorial/starting
Hi Max, I need to save every image captured with a unique file name. How can i do that? I am looking for way to save the image with the file name I will enter using my capture form. I tried to use the “Rename()” command from “On Exit event”, but the command seems to conflict with visual basic command syntax.
Please help.
I’ve been using AccessImagine for several years and love it.
I’m not sure what happened today, but the paste icon is no longer present inside the control. Any idea how I can get it back? It doesn’t show up in my database or the demo database.
Hoping you can help.
The Paste icon appears only when the image is present in clipboard. More likely you have something in clipboard that is not an image.
Please explain default location Where the images are stored in AccessImagine
By default images are stored in database – until you specify StoragePath.
Great Utility,
Is there a way to capture multiple pictures for one record?
You may create several picture fields for one record or use subtable and subform for images.
Worked like a charm, thank you very very much.
I am building an access form to allow us to snap and store images of shipments as we are auditing them. The shipments will all have a Ship##### number (for example SHIP12345), and that corresponds to a folder on our doc server (X:\SHIP12345\Photos\)
On our form, we have a entry box for the shipment number, and the your AccessImagine control. Testing on this works ok dumping it to a temp store location. As each image is snapped, it saves it as scan1, scan2, scan3 etc automatically. When we are done, we can click a button and dump these images to the X drive folder as mentioned above. But if we then go in and do additional photos, we get duplicate image names, and things break.
So… my questions.
1. Can the StoragePage be set to a dynamic name (ie X:\{foldername}\Photos), which would then I assume keep incrementing what is in that folder already?
2. Can a control button be set to do the image snap, instead of using the camera symbol in the image control?
3. Is there a way for it to save an image without exiting (or in my case, I am requerying each time with a button)? I have a dummy table that I am using to do the saves now.
The ideal goal is for me to open the form, fill in the shipment number, then use a “shutter” button to take a number of images saving to the appropriate shipment folder, than close the form (or refresh to start a new shipment number) when all is done. I have gotten part way there, but not having the ability to use a shutter button and have it save automatically is making the process slow.
Figured out the static path name issue through VBA, so one issue resolved (I think)
I see you can auto-click when you click on the control using Pic.InstantScan(1) but I get an error using this. I tried on the “on focus” event.
I see there is a PIC.SAVE as well, but have not gotten pic. anything to work.
When I tried to try. I had a message
Because of your security settings and current security policy, this control is disabled. To modify your policy and anable database, use the Message Bar.
AccessImagine is great for showing an image contained in an external file in the Access application. However I cannot get it to save an image to a MySQL table using VBA.
In a multi-user environment I cannot use external files and need to save to a Blob field contained in a MySQL table. I use VBA to copy the image to an AccessImagine control on an Access form. This control has the MySQL column as its ControlSource. When the record is saved the rest of the data is saved but the Blob field remains empty. Can you please assist?
Español:
Error al crear el archivo .mde, sale el mensaje “No se puede cargar el control activex en uno de sus formularios o informes”. Qué puedo hacer?
English:
Error creating .mde file, “Unable to load activex control in one of your forms or reports” message. What I can do?
Hard to say. Does AccessImagine works properly before creating MDE file?
I’m trying to figure out how to capture and image then save the image to a table via vba. I have a table set up with an OLE Object, and I’ve taken pictures, but I can’t seem to find the right code to take the capture and save it via recordset, then recall that image. I’d rather not save an exterior file and I’m trying not to link the form to a recordsource. Any ideas?
It’s better to bind AccessImagine to OLE field, or you lose all the automation and have to do elemental things by VBA.
Anyway, the AccessImagine “Image” property holds actual image in JPG, both reads and writes are allowed.
Hi Max,
Our organization recently switched from Access 2016 to Office 365 (and whatever version of Access that is). This forced me to switch from AccessImagine 1.63 to 1.74. The software is used on tablets outdoors. We are now seeing a delay in what the camera is pointed at and what shows on the screen. Also a delay when taking the photo to when the camera closes and shows on the photo on the form in the database.
So for example: We start the camera point it at the subject then have to wait 5 seconds (sometimes users report up to a minute) then the image on the screen updates, then we take the photo and have to wait another 5 seconds (or more) for the camera to close.
Not a long time, but we do road construction and standing in traffic any more than necessary makes us nervous.
Any ideas why this is happening now or how to speed it up?
Thanks
Maybe you had another image taking method before? Try performing right mouse button click at “Use Image” icon and testing different methods.
I checked the image source and it’s the same as we have always used “Rear Integrated Webcam”. So I tried other options and “Windows Camera App” fixes the issue.
The problem is that choice only appears if the computer is connected to the local network. If we leave the network (which we do often) it changes back to “Rear Integrated Webcam” and “Windows Camera App” isn’t a choice anymore. The Windows Camera App software is installed locally so I don’t understand why it is only an option when connected to the wi-fi. Is there a way to code this as the choice instead of having to choose it from the right-click menu?
Thanks
Yep, that’s strange.
Try VBA
Picture0.ScanSource = -4
That should select Windows Camera App.
The control holding the image is named SignPhoto, so if I understand correctly it should be:
SignPhoto.ScanSource = -4
Where is the best place to put this? I tried adding it to the FormOpen event. Stepping through it I don’t see any errors, but running offline still doesn’t load the Windows Camera App.