Adding pictures path

F

Fred's

Hi Folks,

I have an access form which includes information about my vendors
mistakes and this form gather the information form a vendor table and
now I will like to add pictures to my form, but I dont want to add the
pictures as an Object into my database, I will prefer to add the path
of the picture.

Since I am not familliar with adding pictures path into an access
database, can someone tell me how can do that step by step.

Thanking you in advance for your help!

Fred's
 
?

=?iso-8859-1?Q?Vladim=EDr_Cvajniga?=

1) Create a memo-field or dbText, 255 in an appropriate table. Name it
picPath.
2) Add a picture (name it Pic1) to your form (and a text box to edit
pathname; not really necessary to be displayed; it may be invisible, but it
needs some routines to remove the pathname if necessary).
3) Add a OnClick function to a picture and use CommonDialog to browse for
files. Not sure if CommonDialog is available in Access, since I have VB 6
Professional which includes CommonDialog (ActiveX).
4) CommonDialog returns a full path - store it in a picPath, see 1).
5) On Form_Current:
On Error Resume Next
Pic1.Path = nz(picPath.Value)

HTH

Vlado
 
S

storrboy

1) Create a memo-field or dbText, 255 in an appropriate table. Name it
picPath.
2) Add a picture (name it Pic1) to your form (and a text box to edit
pathname; not really necessary to be displayed; it may be invisible, but it
needs some routines to remove the pathname if necessary).
3) Add a OnClick function to a picture and use CommonDialog to browse for
files. Not sure if CommonDialog is available in Access, since I have VB 6
Professional which includes CommonDialog (ActiveX).
4) CommonDialog returns a full path - store it in a picPath, see 1).
5) On Form_Current:
On Error Resume Next
Pic1.Path = nz(picPath.Value)

HTH

Vlado


Check this link for info on using the File/OpenSave dialog in Access
http://www.mvps.org/access/api/api0001.htm

If you intend to link multiple pictures to a record, or think may ever
need to in the future, it might be wise to create a separate table for
this. This table would have fields for the main records ID and a
selected file path as a minimum. Relate the two tables by the main
records ID.
 
F

Fred's

Hi Unfortunately, I don't have CommonDialog (ActiveX). in access. So
this dosen't work.

Fred's
 
?

=?iso-8859-1?Q?Vladim=EDr_Cvajniga?=

Pls, check out storrboy's post for browsing files without CommonDialog.
V.
"Fred's" <[email protected]> píse v diskusním príspevku
Hi Unfortunately, I don't have CommonDialog (ActiveX). in access. So
this dosen't work.

Fred's
 
L

Larry Linson

Fred's said:
Hi Folks,

I have an access form which includes information about my vendors
mistakes and this form gather the information form a vendor table and
now I will like to add pictures to my form, but I dont want to add the
pictures as an Object into my database, I will prefer to add the path
of the picture.

Since I am not familliar with adding pictures path into an access
database, can someone tell me how can do that step by step.

The sample imaging databases at http://accdevel.tripod.com illustrate three
approaches to handling images in Access, and the download includes an
article discussing considerations in choosing an approach. Two of the
approaches do not use OLE Objects and, thus, avoid the database bloat, and
some other problems, associated with images in OLE Objects.

If you are printing the images in reports, to avoid memory leakage, you
should also see MVP Stephen Lebans' http://www.lebans.com/printfailures.htm.
PrintFailure.zip is an Access97 MDB containing a report that fails during
the Access formatting process prior to being spooled to the Printer Driver.
This MDB also contains code showing how to convert the contents of the Image
control to a Bitmap file prior to printing. This helps alleviate the "Out of
Memory" error that can popup when printing image intensive reports.

Larry Linson
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top