| | | Test whether a field contains an image (Access Forms) | 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
| |
|
|