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


DBPix Sample Source Code: frmMain
Back to sample
Option Explicit

Dim EditMode As Boolean

Private Sub Form_Load()
    ' Initialize EditMode
    EditMode = False
End Sub

' Main image has been changed - update the thumbnail
Private Sub DBPixMain_ImageModified()
    If DBPixMain.ImageBytes > 0 Then
        DBPixThumb.ImageLoadBlob (DBPixMain.Image)
    Else
        DBPixThumb.ImageClear
    End If
End Sub

' Open the Zoom (detail) view when the main image is clicked
Private Sub DBPixMain_Click()
        Dim strWhereCategory
        strWhereCategory = "[Id ]=" & Me!Id
        DoCmd.OpenForm "frmZoomMainImg", acNormal, , strWhereCategory, , acDialog
End Sub

' Switch between sub-image 'View' mode and 'Edit' mode (swaps between the 2 subforms) 
Private Sub btnEditSubImages_Click()
    If EditMode Then
        subSubImages.SourceObject = "fsubViewSubImg"
        EditMode = False
        btnEditSubImages.Caption = "Edit"
    Else
        subSubImages.SourceObject = "fsubEditSubImg"
        EditMode = True
        btnEditSubImages.Caption = "View"
    End If
End Sub


Back to sample