adding a personel's photo in a database ( in form & then Report ) (1 Viewer)

totolkhan

Registered User.
Local time
Today, 04:39
Joined
May 23, 2005
Messages
30
:confused: hi guys
i'm working on a Personnel Project that get members information & data like Name , F_name , Birth date , place of birth & some other informations , but i want to add a Picture frame that show picture of every member in my form ( each record has a diffrent photo that i can select it from hard and fit it in a for example 3x4 Frame & store it in a access database .
and then add that photo in a report with other datas !!!
would u please help me doing that ?!
thanks
 

Mile-O

Back once again...
Local time
Today, 11:39
Joined
Dec 10, 2002
Messages
11,316
I would suggest storing the images elsewhere and linking to them instead as images heavily increase the size of a database. You can set the image field to be a text field with the path to the image and then, on the form, use an image control, setting it's image path to the field.
 

totolkhan

Registered User.
Local time
Today, 04:39
Joined
May 23, 2005
Messages
30
size of database isn't important for me

size of database isn't important for me

and i want to select photo from folders to (my photo filed) and then automaticly have them in Report for Print .
( i think in this case i have to do it with OLE !! :confused: )
 
Last edited:
R

rok2774

Guest
totolkhan said:
size of database isn't important for me

and some thing very important : i'm not professional as u , please tell it to me as A B C ... , this is a apple , this is a book ;)
thanks again

I am a very non-professional, also. This might be a very strange way of doing it, but it works for me. I hope it helps. It does increase the size of the database. I have Access 2002 btw.

Open the members table in design mode.
Add to a field to the members table and call it photo. Under data type the photo field should be OLE Object. Save the table.

Make a members form and include the photo field. Save the form. Switch to form view In form view right click on the photo field and choose insert object. Another box will open choose create from file then choose Browse then choose the photo file you want to put on the record then click OK

At this point you may have to resize the photo or adjust the photo field. If you want to adjust the photo field the switch to design view. and adjust the photo box, then save the form.

Another way is to redajust the photo. In form view right click the photo again , and this time select Photo Editor Photo Object the click edit. The Microsoft Photo Editor should open with the photo displayed. In Microsoft Photo Editor where it says File Edit View Image..etc You want to select image then resize (Don't worry you wont change the original photo) I found resizing the photos to 200 x 150 pixels is a good size for me. then close the Photo Editor (red x in the upper right hand corner) and you will have your resize photo in the members form.

Best regards,
Pastor Nick.
 

totolkhan

Registered User.
Local time
Today, 04:39
Joined
May 23, 2005
Messages
30
it helps but

thanks dear pastor it works but in Form View mode after righ clicking on Ole and adding photo for example john1.jpg it will just shows me "John1.jpg in Ole object field !
just this text , it didn't show me photo that i selected .

and same thig in report View , just show me the Image file's name.jpg nothing else


---------------------------------------

at northwind project there is a add/change button Image Frame & Image Path in Employes Form i used them in my project and for this part of code :
Sub getFileName()
' Displays the Office File Open dialog to choose a file name
' for the current employee record. If the user selects a file
' display it in the image control.
Dim fileName As String
Dim result As Integer
With Application.FileDialog(msoFileDialogFilePicker)
.Title = "Select Picture"
.Filters.Add "All Files", "*.*"
.Filters.Add "Bitmaps", "*.bmp"
.Filters.Add "JPEGs", "*.jpg"
.FilterIndex = 3
.AllowMultiSelect = False
.InitialFileName = CurrentProject.path
result = .Show
If (result <> 0) Then
fileName = Trim(.SelectedItems.Item(1))
Me![ImagePath].Visible = True
Me![ImagePath].SetFocus
Me![ImagePath].Text = fileName
Me![Name].SetFocus
Me![ImagePath].Visible = False
End If
End With
End Sub

i selected Vb>Tools>refrences > Microsoft Office 11's library and it shows me a dialog box that i can select my Picture from file but after selecting a picture it shows me this error :

RUN-TIME ERROR '2135'
THIS PROPERTY IS REAL-ONLY AND CAN'T BE SET.

and after that how can i use a selected picture @ Form View in my Report ?!

p.s. i'm working with Access 2003 +Sp1

thanks
 
Last edited:

totolkhan

Registered User.
Local time
Today, 04:39
Joined
May 23, 2005
Messages
30
I Found my problem ,
i made it work .
but know how can i use link of pictures that stored in Photo field in my database as Picture again and using it in Report.
 
Last edited:

Curious

Registered User.
Local time
Today, 22:09
Joined
Oct 4, 2005
Messages
53
Access 2003 only shows .BMP files because of missing OLE Server in Office 2003

Hi People,

I think I've found the simple explanation to this problem, which has been plaguing me also.

Microsoft explains how Access 2003 requires an OLE Server to show pictures other than .BMP files in an Access database. Previous versions of Office included the OLE Server with Microsoft Photo Editor. Office 2003 comes with Microsoft Picture Manager which doesn't come with an OLE Server.

Read this article to find out more details and a solution:

http://office.microsoft.com/en-au/assistance/HA011504111033.aspx
 
Last edited:

Users who are viewing this thread

Top Bottom