First post on this website - i was just wondering if this would be possible to do -
I am trying to create a database for my brother so that he can enter his clients into it and obviously keep a record of them - however when he say wants to go into a clients profile - he would like there survey (jpeg - picture) to be able to come up as he enters - is this possible to do in Microsoft Access - if soo how?
In the database he would like -
Clients Name (First Second and Title)
Client Post Code
Client Phone Number / Fax Number
And finally either a link to the clients survey pictures or for them to pop up? -
I used to do this kind of thing at college however many years of drink has destroyed quite alot of my brain cells - any help at all would be appreciated - peace up A -town down
In the Form Design view add an 'Image' Object to the form. Follow the wizard to set an image to a default "Blank.jpg" (You can make a jpg that says blank for records that do not have an image.) Then use the On Current Event of the Form to add code to set the Picture Path based on the 'ClientID' value of the record. (assuming you will have a unique 'ClientID' for each record included in the forms recordset)
The code should be something like this only using the image object name on your form and correct image path constant for client photos.
Const strPath = "C:\Documents and Settings\User\My Documents\Client Pictures\"
Private Sub Form_Current()
Dim strPhotoPath as String
strPhotoPath = strPath & Me.ClientID & ".jpg"
If Not FileExists(strPhotoPath) Then
strPhotoPath = strPath & "Blank.jpg"
Me.Image0.Picture = strPhotoPath
You will also set the Image Object Properties to:
'Picture Type' Linked
'Size Mode' Zoom
And make your image dimensions or Image Frame consistant with the image sizes so they do not look distorted on the form.