Results 1 to 2 of 2
  1. #1
    Starter-4-10 is offline Novice
    Windows 10 Access 2003
    Join Date
    Dec 2016
    Posts
    27

    Unbound linked image frames can’t find the “pick an image” folder any more – suggestions?

    5000 records, each with 4 image frames, the images specific to that record. Actual images held in folders.



    On transferring from XP, where the database worked fine, References wanted Common Dialog (pasted, ok) and XP Web Components (unticked, ok - but lost, say, OWC.dll?). But when the database finally opened, the double-click event would get to the code below, open the MsgBox if the code requires, but wouldn’t respond to any “answer-click” in the MsgBox, or go directly to the photo folder (as required if clicking when there's no image currently present).

    The table listing the current images seems fine. The frames' Picture Property shows full, correct address for current image. Relationships diagram (as in XP) shows no links. Names and addresses (C:\etc) have not been changed.


    Private Sub fraPhoto3_DblClick(Cancel As Integer)

    On Error GoTo Err_fraPhoto3_DblClick

    Dim strPath As String
    Dim iResponse As Integer

    iResponse = vbYes
    If Me.Photo3 <> "" Then iResponse = MsgBox("Do you want to Replace image (Yes), Remove image (No), or Leave image (Cancel)?", vbYesNoCancel)

    If iResponse = vbYes Then
    ctlCommonDialog.InitDir = strPhotoDir3
    ctlCommonDialog.ShowOpen
    strPath = ctlCommonDialog.FileTitle
    Me.Photo3 = strPath
    Me.fraPhoto3.Picture = strPath
    ElseIf iResponse = vbNo Then
    Me.Photo3 = Null
    Me.fraPhoto3.Picture = ""
    End If
    Err_fraPhoto3_DblClick:


    End Sub

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I don't remember exactly what my problem was but I recall something with the OWC.dll causing me problems so I went to something more like:

    Code:
    Dim fdo
    
    Set fdo = Application.FileDialog(3)
    With fdo
        .Title = "Select a file to import"
        'looks up default starting location for import files
        .InitialFileName = DLookup("[ImportLocation]", "tblLocations")
        .filters.Clear
        'adds only excel file to default search parameter
        .filters.Add "Excel Files", "*.xls*"
        .Show
        'hands the selected file/folder information to fldFile
        fldFile = .SelectedItems.Item(1)
    End With
    it was more generic and didn't require me to change my references and seems to work (so far) across ms access platforms for me (haven't had occasion to go back to 2003/XP if that's still an issue for you)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 07-13-2015, 12:07 PM
  2. Replies: 2
    Last Post: 01-07-2013, 05:23 AM
  3. Replies: 2
    Last Post: 10-10-2011, 10:58 AM
  4. Unbound object not showing all of image
    By NISMOJim in forum Reports
    Replies: 11
    Last Post: 04-22-2011, 02:44 AM
  5. Linked Image on Form
    By jheintz57 in forum Forms
    Replies: 0
    Last Post: 03-31-2010, 12:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums