Solved

error '438' Object doesn't support this property or method when deploy access applicatioon on client machine

Posted on 2003-12-11
10
2,044 Views
Last Modified: 2007-12-19
Hi,

I have developed an access application. This application consists of form, queries, table, modules (VBA).
The access application run well in my machine (windows XP profesional). However when I deploy this access application to client machine (windows 2000 profesional), i found this error when user try to click on the 'browse' button.
"error '438' Object doesn't support this property or method"

This is the code for the browse event:
Private Sub cmdBrowse_Click()
 Dim strNewFile As String
   On Error GoTo Browse_Err
   With Me.cdlgOpen
      InitDir = "C:\MyDocuments\"
      .CancelError = True
      .Filter = "Excel Files (*.xls)|*.xls|"   'Can change (i.e. "Word Files (*.doc)|*.doc|") or ("All Files (*.*)|*.*|") see help for other examples
      .ShowOpen   ' Can use showSave for saving file, same principle
      strNewFile = .Filename
      txtFilePath.value = strNewFile
   End With
                             
Browse_Exit:
   Exit Sub

Browse_Err:
   If Err.Number = 32755 Then
      Resume Browse_Exit
   Else
      MsgBox Err.Number & ": " & Err.Description
      Resume Browse_Exit
   End If

End Sub

How can I solve this problem? thanks!

0
Comment
Question by:linnyphang
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 3

Expert Comment

by:bossjohnc
ID: 9919594
If this code works on some machines and not others, then you may want to make sure the MDAC versions are sufficiently recent/compatible on both machines.

You can download MDACs here...

http://msdn.microsoft.com/library/default.asp?url=/downloads/list/dataaccess.asp

You can use componentchecker to identify incompatible MDAC files and the current version of the MDAC - it's available here...

http://support.microsoft.com/default.aspx?kbid=307255

where there is lots of other useful info on the subject.

This might not be your problem, but I suspect it may be.
0
 
LVL 30

Accepted Solution

by:
nmcdermaid earned 125 total points
ID: 9920280
You will proabbly find that the version of common dialog (it looks like you're using it) is different between machines.

Common dialog is in COMDLG32.OCX.. check the version of this file between machines.
0
 
LVL 39

Expert Comment

by:stevbe
ID: 9922068
using the straight api code for the file dialog box avoids the dll nonsense you are experiencing...

http://www.mvps.org/access/api/api0001.htm

Steve
0
 

Author Comment

by:linnyphang
ID: 9925647
I deploy the application again by include COMDLG32.OCX in my deployment package.
I install this package on client machine. It works!

However, it wont works if i manually copy this COMDLG32.OCX directly to clinet machine (c:\winnt\system32\)

Thanks a lot for you comments!
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 9926741
It's good to have a solution but just be wary about deploying DLL's as unfortunately they are 'common' libraries that other applications use and if you copy on one vesion when all the applications are expecting another version, all hell breaks lose!

As far as copying the files on, you usually also need to register them using REGSVR32

0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 39

Expert Comment

by:stevbe
ID: 9929860
"It's good to have a solution but just be wary about deploying DLL's as unfortunately they are 'common' libraries" ...

that is why I always use the api code instead of the control, I never have to worry about it.
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 9940721
The API code references COMDLG32.DLL instead of COMDLG32.OCX, so there isn't that much difference.

0
 
LVL 39

Expert Comment

by:stevbe
ID: 9941508
the difference is that I do not have to worry about presence or installation of the .ocx :-)
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 9941606
True, but what I mean is, OCX or DLL, it doesn't matter, they are both common libraries. If you can get a version problem on the OCX (as in this case), you can get a version problem on the DLL. :-). We won't know in this case unless bossjohnc wants to try your code. I would be interested to find out.

Certainly as far as Access goes, using API's are far more reliable than ticking things in the References or Components list. In fact it might be a good  habit for me to start using if it stops that annoying 'Reference not found' problem.







0
 
LVL 3

Expert Comment

by:bossjohnc
ID: 9941704
No, not me! I'm not the original author - however from my understanding, if you use the API (DLL), it doesn't matter what version it is, as Windows deals with it rather than Access. For example, with the file dialogue API, depending on the version, the dialogue may look different (depending on the version), but the result passed back to Access won't differ.

I have a fairly basic understanding so I might be wrong of course : )
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ms/access ftp / SFTP 3 32
is there a opposite on ON CURRENT in ms/access 15 31
Open CSV, modify and save as xls from Access 12 19
Run Time Error 3071 26 34
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now