Linking Images to a table 
Author Message
 Linking Images to a table

I'm trying to build a Data base
where I can input a picture for each person

I got the DB to call the program in order to take the picture of a digital
cam
I can see the related picture in the DB if I set the path in a field (Photo)

my question is
how do I link it all together?
when I take the picture, I need to save it and give it a name
and then I need to manually put the path and the name in my Photo field

is there a way to get the picture program to take the "save" name from my
DB?
or for the DB to find the Pic without writing the path manually ?

thanks a lot

Gal



Mon, 06 Jan 2003 03:00:00 GMT  
 Linking Images to a table

Hi Gal,

I had to link word doc's to certain persons (one doc per person). In my db one
just has to click a button to view the document. The doc's are saved as
Lastname_Firstname.Doc. Here is the code you may want to put into the
FormCurrent event. It needs a "picturefield" named MyPicture and should be
linked to the picture you want to display when no current picture is available.
I used three more field: FistName, LastName and FileName. Furthermore there is a
commandbutton to unhide/hide the field FileName in case I need a different
filename (see below for explanation). It's hidden so, as not to confuse my users
;-). I adapted the code so it will display bitmaps but i didn't test it so be
careful.

HTH David

'Code Start

Private Sub FormCurrent()
On Error GoTo Err_FormCurrent
Dim MyFile As String, MyPath As String

'First check wether there is a special filename saved in the hidden field
[FileName]
'in case the name is twice there or reads like Donna Dolores Ascension dela Rose
de Purificacion...
    If isNull([FileName]) Then
        MyFile = [LastName] & "_" & [FirstName] & ".bmp"     'Get normal
filename
        else
        MyFile = [FileName]
    End If

    MyPath = "C:\whateverpath\"
    Me.MyPicture.Picture = MyPath & MyFile

Exit_FormCurrent:
    Exit Sub

Err_FormCurrent:
    If Err.Number = 2220 Then    'No picture found
        'Fill in code to happen if no picture available
        Resume Exit_FormCurrent
    end if
    MsgBox Err.Description, , Err.Number
    Resume Exit_FormCurrent

End Sub

'Code End



Mon, 06 Jan 2003 03:00:00 GMT  
 Linking Images to a table
Hi David
thanks for the code, but I already got this part working
my main problem is getting the image grabbing program to use my ID as the
save name

at the moment I have 2 macros working
1) copy the ID
Open the program

now after taking the picture I only need to paste

2)set image Path

I'd like to add these 2 in this order
and getting the ID to be pasted automatically in the other program

thanks again
Gal


Hi Gal,

I had to link word doc's to certain persons (one doc per person). In my db
one
just has to click a button to view the document. The doc's are saved as
Lastname_Firstname.Doc. Here is the code you may want to put into the
FormCurrent event. It needs a "picturefield" named MyPicture and should be
linked to the picture you want to display when no current picture is
available.
I used three more field: FistName, LastName and FileName. Furthermore there
is a
commandbutton to unhide/hide the field FileName in case I need a different
filename (see below for explanation). It's hidden so, as not to confuse my
users
;-). I adapted the code so it will display bitmaps but i didn't test it so
be
careful.

HTH David

'Code Start

Private Sub FormCurrent()
On Error GoTo Err_FormCurrent
Dim MyFile As String, MyPath As String

'First check wether there is a special filename saved in the hidden field
[FileName]
'in case the name is twice there or reads like Donna Dolores Ascension dela
Rose
de Purificacion...
    If isNull([FileName]) Then
        MyFile = [LastName] & "_" & [FirstName] & ".bmp"     'Get normal
filename
        else
        MyFile = [FileName]
    End If

    MyPath = "C:\whateverpath\"
    Me.MyPicture.Picture = MyPath & MyFile

Exit_FormCurrent:
    Exit Sub

Err_FormCurrent:
    If Err.Number = 2220 Then    'No picture found
        'Fill in code to happen if no picture available
        Resume Exit_FormCurrent
    end if
    MsgBox Err.Description, , Err.Number
    Resume Exit_FormCurrent

End Sub

'Code End



Sun, 12 Jan 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Changing the linked table path without the linked table manager

2. Trying to link image to an Access table...

3. linking all fields in linked table?

4. Linked tables - changing the link

5. Changing Linked Table link?

6. To link procedure and table in visual linking...

7. Linked Table VS Import Table

8. Make adp table behave like linked mdb table.

9. Linking tables vs. Opening tables directly

10. Make Table Query from Linked SQL Table

11. Linked Table VS Import Table

12. Linking Access Tables in Different *.mdb Files, Populating an Access Table From Several Others

 

 
Powered by phpBB® Forum Software