Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2002
    Location
    Illinois
    Posts
    133

    Unanswered: run-time error '438' w/common dialog control

    I have an Access 2003 app that has an ActiveX image upload common dialog control. It uploades pictures from a digital camera. It ran fine on an XP machine with Office 2003. When run on a new XP machine with Office 2007, I get the run-time error '438' "Object doesn't support this property or method". It does run fine on my XP machine, which has Office 2007 (it also still has Office 2003 on it). Here is part of the code. It fails on the line indicated:

    strfilelocation = "E"

    Dim path As String
    Dim str1 As String
    Dim str2 As String
    Dim str3 As String
    Dim str4 As String
    Dim str5 As String
    Dim str6 As String

    'code fails here
    Me.ActiveXCtl6.InitDir = strfilelocation & ":\DCIM\101MSDCF"
    Me.ActiveXCtl6.DialogTitle = "Select Pictures"
    Me.ActiveXCtl6.Filter = "JPG Files|*.jpg;*.jpeg"
    ActiveXCtl6.Flags = cdlOFNAllowMultiselect
    ActiveXCtl6.ShowOpen

    Any ideas on how to fix?

    Thanks.
    SteveH

  2. #2
    Join Date
    Jan 2002
    Location
    Bay Area
    Posts
    511
    Comment out the problem line of code and see it you also get an error on the lines that follow. If you have not done this, use Access intelli-sense to fill in the control's properties you want to set. Does the intelli-sense work for this control? If not, you may have a spelling issue. Run each of the four lines of code to see if any succeed. I don't know how to fix the problem, but these are some of the things I would try.

  3. #3
    Join Date
    Apr 2002
    Location
    Illinois
    Posts
    133
    I resolved the issue by placing the ComDlg32.ocx file in the Windows\System32 directory and registering it on the machine using the REGSVR32 command.
    SteveH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •