all groups > sql server programming > february 2007 >
You're in the

sql server programming

group:

Upload and display images on Access form stored in SQL Server 2000



Upload and display images on Access form stored in SQL Server 2000 Rex
2/14/2007 9:51:35 PM
sql server programming: Hi

I am using Access as a front end for my SQL Server 2000 database. I
want to store images straight in the database. I want to write a VBA
code inorder to do the following:

1. Upload an image in the database
2. See the image on my form when I navigate through each records of
images.

I am not a good VBA programmer and so I am not able to figure out how
to do this..

Any help would be appreciated...

Thank you
Rex
Re: Upload and display images on Access form stored in SQL Server 2000 raibeart
2/15/2007 6:20:23 AM
Rex,

You do not want to store in the database with Access. Access will
also store the program to open the image with it. Very big bloat.

Put your images in a directory.
Store the full path to the image, including the name of the image in
the database.
Use the image control on your form.
Write the code to requery the image control with the new image
location as you change records.
Put the code in the OnCurrent event of the form.

Robert


[quoted text, click to view]

Re: Upload and display images on Access form stored in SQL Server 2000 Rex
2/15/2007 2:55:14 PM
I realise that storing the images in the database is not very
advisable and the alternative solution is to store it in a directory.
However, since I am using SQL Server 2000, I think storing the images
straight into the database should not be a problem. I want a VBA code
which would help me upload images straight into the database from a
form and also displays the images (stored in the SQL Server database)
on the form when I navigate through each records.

cheers

[quoted text, click to view]

AddThis Social Bookmark Button