Forms

  • Thread starter Thread starter Christina
  • Start date Start date
C

Christina

I have a database with a table , and a form to input into the table Personal
Information. Are you able to use pictures in Access, whereby I can have a
picture show up on the form next to each person's name. If possible, someone
please guide me slowly.

Thanks.
 
Have you taken a look at the Northwind database yet. In this sample database
you'll find exactly what you need. Look in
programfiles/microsoft/office/office../samples or simply download it..
 
Thanks. I see it , but dont know how to really make it work for me. WOuld
you be able to guide me through?


Thanks
 
Sure but tell me what you've got so far so we have a starting point. Be aware
that adding pictures to your database will bloat it (the size of the database
will huge!)
 
I have a table with name, date of birth date and other personal info, which I
input using a form. I will run some queries and reports later. Thanks, I
need basic instructions though :)
 
Yes 2003. I will unable to check my replies for a while, but please do go
ahead and tell me what to do. As soon as I get back I will check it and
continue.

THanks
 
Hi Christina,

It has been this long he, sorry for the delay but here we go:

first make sure the picture is defined as a text field in your table. Alle
the other fields you can set as desired.

Now go to the forms section and create a new form in design view. Make sure
the table which holds the picture field is the source of the form.

Now in the form drag a picturebox from the toolbox. When you have the 'wand'
enabled it will ask you for a picture. Choose any picture just to serve as a
dummy. When placed remove the picture from the properties window of the
control (Right click the control and choose properties). The second option
should be empty. If correct you should see an empty control. Rename this
control to "ImageFrame" (without the quotationmarks)

Now place a button under the picture which says "new picture" if you'd like
you can also place a button "delete picture". Rename the buttons to
"AddPicture" and "RemovePicture"


Now here comes the easy part.

Save the form and close the database. Open the Northwind database and close
the opening form. Press Alt-F11 and double click the form_employees in the
left treeview. This will show the code in the codewindow (for this particular
form)

Now copy all the code (ctrl-A / ctrl - c)

Go back to your db and open your form in design. Press Alt -F11 again and in
the VBA window make sure you doubleclick you formname.

Paste everything you just copied to this form.

Make sure the following is set correct; the textbox which refers to your
picture should be called "ImagePath" (without the quoatationmarks) and make
sure you have a textbox called "FirstName".

When you save the form you should be able to add picture to the database.
One advantage is that the pictures aren't actually stored in the database
which will prevent it from bloating you db. So when you look in the table
you'll actually a path where the picture is stored.


Let me know it it works out for you.
 
Back
Top