Question : Microsoft Office Access can't open the file...

I wanted to apply a theme to my forms...pictures, company logos, etc. But, I don't want to have the same pictures embedded in virtually the same spot on every form (especially since embedding is EVIL) . I did it while designing the thing (to get a feel for the final look) and the database bloated to to 100 MB - which is what I expected going in. So I put in a table to hold the objects, since I figured storing 4 small files wouldn't hurt anything. My thought was to set the picture property of some blank image fields upon opening the form.

Private Sub Form_Load()
Me.Pic1.Picture = "jNew Picture 1.jpg"
Me.Pic2.Picture = "jNew Picture 2.jpg"
Me.Pic3.Picture = "jNew Picture 3.jpg"
Me.Pic4.Picture = "jNew Picture 4.jpg"
End Sub

It works...sort of. I get an error about Access not being able to find any of the pictures UNTIL I embed any other object in the holder table (FormPix_tbl). Then everything works fine. Could somebody tell me what I'm missing? Would be very much appreciated.
 

Answer : Microsoft Office Access can't open the file...

You don't have to use the NZ function if you know that data is there,

FieldName is the name of the field holding the objects, tblName is the name of the table holding the objects. :)

=DLookUp("[FieldName]","[tblName]","[RecNum] = 1")
Random Solutions  
 
programming4us programming4us