Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Path in data field 1

Status
Not open for further replies.

rick29071955

Programmer
Feb 19, 2003
5
0
0
GB
I have an access 97 database which will hold 32 bitmaps (approx 5k each)I originally set it up to keep the image in the database, but upon testing I found that this will very rapidly fill up the database.
Browsing tek-tips I found a suggestion (by elvenmaiden thread709-391834)to put the filepath in the database and then call the path to load the pic/image box.
How do I do this? Bearing in mind that the 32 bitmaps will have been dropped from another set of image boxes. All required bitmaps are in one directory.
I have spent the last two weeks trying different ways of setting this program up and the last 2 days searching through tek-tips.
Will it be a series of IF THEN statements?
ie:-

if image1=bitmap1 then
2=bitmap1 then
x32


Any help will be appreciated.[bigears]

Rick
 
The code below would loop through all .bmp files in the c:\myPics directory and update the Picture property of myControl.

dim MyPath as String
dim MyName as String
dim objPicture as Object

MyPath = "c:\myPics\*.bmp"
MyName = Dir(MyPath, vbDirectory)
Do While MyName <> &quot;&quot;

Set objPicture = LoadPicture(MyPath & MyName)
myControl.Picture = objPicture
Loop

Hope this helps!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top