Home
DBPix
Download
Order
Testimonials
Support
Tutorials
Samples
KnowledgeBase
Links
Revision History
Documentation
Search
Contact
Site Map

Graph: DBPix image storage vs OLE Embedding and Linking in Microsoft Access


Test whether a field contains an image (Access Forms)

    
DBPix Image Control 
DBPix Developers Kit
Download V2.0
For Windows XP, 2000,
NT, ME, 98 & 95


Buy Now!

DBPix Resources
Samples
Support
About DBPix


The DBPix 'ImageBytes' property returns the size of the compressed image data in bytes, but this value is only available once an image has been decoded. If you use asynchronous decoding (the default) then you may not get the value you expect, depending when you examine the property.

The following code returns the size of the image data whether it has already been decoded or not, so you can call it anywhere, eg in Form_Current events :

UBound(DBPixMain.Image) - LBound(DBPixMain.Image) + 1

(DBPixMain is the name of the DBPix control)

For example:

If ((UBound(DBPixMain.Image) - LBound(DBPixMain.Image) + 1) < 1) Then
 MsgBox "Empty"
End If