dbpix - Using DBPix with recordset data (unbound)

Davros

Registered User.
Local time
Today, 06:03
Joined
Sep 9, 2005
Messages
131
hi
i've been using access for some time but i am in many respects still a begginner and this problem has me stumped.
anyway the problem i have is this; i am trying the evaulation version of DBpix but i want to reference the image using an unbound test box [i think]. i only want to load the image into access when i am viewing that record, when i shut access i only want the image location filename left in the table. the coding i have from their website is this;

"The following code saves the new image into a recordset field after the user clicked a "Load" button to select an image from the file system.


Private Sub BtnLoad_Click()
If DBPixCtl.ImageLoad Then
rs("Image") = DBPixCtl.Image
End If
End Sub "


i have tried creating a load button but the above coding does not work plus i'm not sure where excatley to put the code [create a load button? put the event on the load button on the popup menu?]. the help files suggest putting the code on the 'imageload' call but i cannot find this anywhere except in the 'events' help description.
sorry for being vague but can anyone help me on this? [if not i'm can still load images by referencing their file locations another way but DBPix seems a good program and perhaps in the long run will save me a lot of time]

thanks in advance
 
This is how I do it:

Create [XXXPath] (VB) and [ImageFile] (Query) concatenated into the File then:

Forms OnCurrent: GetImage()


Function GetImage()

Dim FullPath As String

With CodeContextObject
FullPath = GetImageDir & .[Image File]

If Dir([FullPath]) <> Empty Then
.[ActiveXCtl0].Visible = True
.[ActiveXCtl0].ImageLoadFile (FullPath)
Else
.[ActiveXCtl0].ImageClear
.[ActiveXCtl0].Visible = False
End If
End With

End Function

The .[ActiveXCtl0].Visible = False is to ensure there is no re-iteration on blank images.

I also want to find out whether or not an Image exists and the attributes:

Function SetImage()

Dim FullPath As String

With CodeContextObject
FullPath = GetImageDir & .[Image File]

If Dir([FullPath]) = Empty And .[Image] = -1 Then
.[Image] = 0
ElseIf Dir([FullPath]) <> Empty Then
If .[Image] = 0 Then
.[Image] = -1
End If
If .[Image Width] <> .[ActiveXCtl0].ImageWidth _
Or .[Image Height] <> .[ActiveXCtl0].ImageHeight Then
.[Image Width] = .[ActiveXCtl0].ImageWidth
.[Image Height] = .[ActiveXCtl0].ImageHeight
.[Image Size] = .[ActiveXCtl0].ImageBytes
End If
End If
End With

End Function


I'm a great fan of dbpix soe if you have a problems let me know.

Simon
 
thanks for the reply simon
i shall try the code later
 
Just be careful with the images sizes, keep them as thumbnails i.e. low res.

We have just printed off a report with about 1650 images, Access understandably gets a bit annoyed if the Images are too big.

Simon
 
Just starting to work with dbpix and I do have a small problem.
I did a database which will be used for badging. I used dbpix to acquire the photo id and also from a scanner a copy of the physical ID of the person. Everything works fine.

I just want to make it more simple for the users and I would like to create a button which will open automatically the dbpix in acquire mode. So the actions behind the button will probably be:
1. select the camera (or scanner) (both of them will be connected)
2. right click on dbpix control
3. select from the menu the acquire option.

I will be really happy if I could do this since the right click on the dbpix control is a little bit confusing for a regular user.

Thank you in advance!
 
I just started to use dbpix and I did create a badging database. I used dbpix to acquire the picture of the person from a webcam and a copy of the physical ID card from a scanner. everythingworks just fine.

I want to skip the steps of right clicking on the dbpix control in the form, selecting the acquire option and selecting the camera or scanner. I don't know if this is possible but I would like to create a button which will do all of this, so it will be easier for the users...

Thank you in advance!
 

Users who are viewing this thread

Back
Top Bottom