Using smartphone or tablet to capture images (1 Viewer)

Rachael2211

Member
Local time
Today, 14:38
Joined
Oct 24, 2013
Messages
33
Hi All,

Am guessing this is a long shot (or so my googling seems to indicate as a solution hasn't presented itself yet!). Has anyone successfully been able to integrate and/or access a phone or tablets camera roll. In the perfect world it'd be awesome to click a button, activate the camera, take pic and display in the form. My main use for this is in the field where staff might be doing pest/disease monitoring (in vineyards) or taking pics of accidents/damage for reporting etc etc.

Currently what I have working is using dbpix, third party thingy! So on desktop computers the user can load in images (dbpix squishes them nicely to somewhat avoid db bloat) and have them displayed. This is ok but alittle cumbersome as the the user has to take pic, download onto laptop, then browse to it to embed with the record (as an OLE Object). I have also tested another program called AccessImage which will activate your webcam and works quite nicely but not exactly what Im wanting for field work. I dont see staff walking round the vineyard with a laptop trying to get P/D selfy style pics using the webcam lol.

My best solution would be....staff either access our application with the office ipad/tablet or use their own device to do field work. The application is accessed through an rdp (prob presents more complications lol :p). The staff member can ie create a pest and disease monitoring session or report on an accident and click a button to take a pic to include as evidence with the record. The image is embedded into the form OLE object field.

As a second option I thought that maybe a camera activation button could be incorporated into the ribbon. Third option maybe that a pic is taken on the phone and (obviously) is saved to the camera roll, a button on the form could access the phone/tablets camera roll.

Fingers crossed but feeling not overly hopeful that some of you amazing programmers have done something like this and would be gracious enough to help out, I would be eternally thankful!

Hope you all have a wonderful day despite the current world situation, I'm a victorian in Aust. and we're all diseased according to the other states hahaha at the moment even though i'm on a farm in the mountains and doing what i do every day- working in isolation lol.

Kind regards, Rachael
 

The_Doc_Man

Immoderate Moderator, Former MVP, Retired SysAdmin
Staff member
Local time
Today, 16:38
Joined
Feb 28, 2001
Messages
18,349
First, Rachel, may I suggest that if you are going to take a lot of pictures, you don't wan't to use OLE in an Access database for very long. You would have a limit of 2 GB and it really doesn't take many pix to eat 2 GB of space. But it gets worse in that when you reach a certain critical mass in that DB, you can't even do a compact & repair.

The usual solution is that you put all of the pix in a folder and then have an external link to them. Doing that, the file spec might occupy 100-150 bytes - but the image would occupy 400 to 1200 KB as a JPEG. With an OLE method, you run into trouble with 1000-1500 pictures. With the external "pointer" method you can have many times as many pictures.

One method is that you just find the pic using a file-finder dialog (which can be set up using the File System Object) and then have an image control on your form. When you define a record for the form containing that control, you just store the image spec. To VIEW the image, you just open the form and have a little bit of VBA code to load the file spec to the appropriate property in the image control using the Form_Current event as the trigger. Which means when you open the record in that form, you almost immediately see the pic.

The other solution is to have a hyperlink that you can click to call up the picture. This way doesn't show the pic until you click it, but again there is a massive savings in terms of database bloat issues.

The practical side of this is that you just load the image to the host system. There is nothing wrong with the idea of giving the user a "picker" field on the form to find their copy of the picture. Then you use the File System Object to copy the file to the folder where you want to keep it. Then update the form to contain the file spec of the moved file and tell the form to .Repaint in order to see that pic for the first time through the database.

This folder can easily be the same folder as the place where your shared backend file resides, though others sometimes create a child folder and use that for all externally referenced documents. That last part is a tomato, tomahto decision.
 

Rachael2211

Member
Local time
Today, 14:38
Joined
Oct 24, 2013
Messages
33
Hi Doc_Man, thank you so much for taking time to reply ;)

I understand all what you say and the bloating issue with pics. I'm using the third party dbpix control to partially avoid this problem, it's quite a nice interface for users to display images and not worry about someone messing with file names/locations etc of hyperlinked/external linked images. dbpix control allows a user to click in the pic field, right mouse to get the browse up, find image and display. My application is all about trying to make things as simple for users in the field over an rdp connection. No disrespect meant but some staff aren't great with technology :(

I guess im really interested in how to activate a phone/tablet camera like I've seen in some webcam examples, extensive googling/trolling forums hasn'e quite come up with a solution for this, especially over an rdp. I've seen hints to the WIA (Windows Image Aquistion i think it is) but just can quite figure out how to make something work or if its even possible.

Thank you, Rachael :)
 

The_Doc_Man

Immoderate Moderator, Former MVP, Retired SysAdmin
Staff member
Local time
Today, 16:38
Joined
Feb 28, 2001
Messages
18,349
My point was that somewhere along the line you are going to have to transfer the file. You can't leave it in the phone. But I'm just saying that when you move it from point A to point B, that point B probably shouldn't be as an OLE object but rather as a linked or hyperlinked object. Sadly I have no clue about how to do smartphone linking, though there is nothing wrong with the idea of sending the picture as an attachment in an e-mail, then triggering something to look at Outlook and copy the attachment to its final resting place.
 

Micron

AWF VIP
Local time
Today, 17:38
Joined
Oct 20, 2018
Messages
3,471
Apparently vba can interact with a digital camera using WIA, which is something I've used to edit image files from Access but never to control a camera. This link might be for a 3rd party app, but if they can figure it out (and I haven't misunderstood what their application does) then I suppose you could too. The blurb includes taking pictures via remote or tethered control. The trick, as always, is knowing where to begin if it is at all possible.

EDIT - It is quite possible that the mdb sample might control the camera, but the real trick would be to get the image filename from the camera so that you could associate it with one or more records. Don't know if it can do that. TBH, just now is the first I've seen of this sort of thing, so I hope it doesn't send you down a rabbit hole. Maybe there is a hybrid camera buff/vba person here who has done it!
 
Last edited:

Rachael2211

Member
Local time
Today, 14:38
Joined
Oct 24, 2013
Messages
33
Thank you both for your replies, Ill update with my findings as I'm sure this is a thing that others would want to do, thank you :)
 

Users who are viewing this thread

Top Bottom