Results 1 to 15 of 15
  1. #1
    jimhoelcor is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2015
    Posts
    6

    MS Access 2003, Windows 7, Run-time error 438, Object doesn't support this property or method

    I just replaced a staff person's Windows XP workstation with a Windows 7 machine. We currently use MS Access 2003 which while old still works well for the most part with the Windows 7 machine. There are some reports however that blow up on the new machine but run fine on the old XP machine. A snapshot of the error and code where it is dying is below. It is worth noting that if I comment out the offending line to see what happens it just dies on the next one. It seems there is some compatibility problem but it seems strange in how this is failing. Any and all help would be appreciated.


    Click image for larger version. 

Name:	error.PNG 
Views:	12 
Size:	19.1 KB 
ID:	19265

    Click image for larger version. 

Name:	code.PNG 
Views:	12 
Size:	13.8 KB 
ID:	19266








  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    try breaking it down like this

    debug.print invoice
    debug.print boxcountr
    debug.print format(boxcountr, "0000")

    and see what happens in your immediate window (ctrl-G brings it up if it's not visible)
    it looks like you're just populating a bunch of text boxes with variations of what's been entered so you don't (or shouldn't) need the ME part of those statements.

    you have to find what part of the code this is actually choking on, it *shouldn't* be the ME part of the statement but who knows.

    is PACKAGEID a text box or is it a label? if it's a label try using .caption instead of .displaytext

    You may also be missing a reference but I don't think so
    And you don't need the CSTR function on that first line, when you concantenate a string and a numeric value the result is always a string.

  3. #3
    jimhoelcor is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2015
    Posts
    6
    Hi,
    PACKAGEID is a text box. This code is ran out of a report that is generating a mailing label. The stupid question I have is what is different about a Windows XP machine that this works and not on Windows 7?

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    you still have to find out what the report is choking on before deciding the whole thing is a mess. It could be as easy as re-establishing a reference if it's broken (which frequently happens between versions of access).

  5. #5
    jimhoelcor is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2015
    Posts
    6
    Hi,
    I guess I didn't explain it well enough. A if you run this code on workstation running Windows XP and MS Access 2003 it works fine, when you run it on Windows 7 with MS Access 2003 install it fails. Regardless I need to get it to work on Windows 7. THanks..

  6. #6
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    I have understood the problem from the beginning my friend. I am telling you to find out what part of that statement it is actually breaking on, that will help track down what the issue is.

    Since you don't seem to want to do that the only other thing I can suggest is that you look at the references on the offending machine vs one of the machines that it works on.

    You can get to the reference list in the VBA window by clicking TOOLS>REFERENCES.

    If the references are identical I would need to actually know what part it's breaking on.

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    It errors on the DisplayText property. Not familiar with DisplayText property. It's not showing for me in intellisense popup. So perhaps there is a missing VBA library or perhaps the property was eliminated from Access 2007+.

    I have never found need for Text property.

    Exactly what do you want this code to accomplish?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    jimhoelcor is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2015
    Posts
    6
    Hi, I'm not trying to be annoying but you understand my confusion and I greatly appreciate your patience. I've been trimming the statement down as you can see in the picture here. I haven't found the appropriate combination of what doesn't fail. I will check the references as well..

    Click image for larger version. 

Name:	Capture.PNG 
Views:	9 
Size:	15.8 KB 
ID:	19268

  9. #9
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    what is printing out in the debug.print window (the immediate window, as I said can be accessed by hitting ctrl-g in the VBA window)?

    Did you check the references on a machine that works vs the one that doesn't?

  10. #10
    jimhoelcor is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2015
    Posts
    6
    Hi,
    The same 7 references are checked on both machines. Here is the output your asking for.

    Click image for larger version. 

Name:	Capture.PNG 
Views:	9 
Size:	29.9 KB 
ID:	19273

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Did you see post 7?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #12
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    I agree with June if the references are the same and the debug.print statements are printing out the portions correctly you're going to have to modify how your code works

    primarily replacing the .displaytext and .text commands with something that will perform the way you want it to.

    maybe a sample database would help us figure out a solution if you can provide one for analysis.

  13. #13
    jimhoelcor is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2015
    Posts
    6
    Hi,
    It make sense to me that it there is a missing library or setting given it works on one machine and not another. Your comments just made what rpeare was trying to tell me make sense. This code is formatting output for a mailing label. If you can't tell I'm somewhat new to VBA. I didn't write this code I'm just the guy who gets to deal with it now.. Thanks.

  14. #14
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I reread the OP. Even more mysterious after that.

    Both machines run Access 2003 and show same library references, just different OS. The code should work.

    Does intellisense popop show the DisplayText property on both machines?

    I still do not see DisplayText property with Access 2010.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #15
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    This issue may be due to differences between the two instances of Access itself, and not your database. Is it possible that the PC where the database works properly has some sort of add-in where the .DisplayText property is used, and where Access can deal with it? Your application will fail (as you have seen) if it is copied to a machine where the add-in has not been installed. The property .Displaytext is not part of standard Access.

    You said in your original post that you replaced an XP machine with a new Windows 7 machine. That being the case, the instance of Access 2003 is new as well, and there could easily be something missing, that was in the old one.

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

Similar Threads

  1. Replies: 4
    Last Post: 01-27-2012, 02:16 AM
  2. Replies: 6
    Last Post: 11-18-2011, 03:46 PM
  3. Replies: 5
    Last Post: 08-05-2009, 04:07 PM
  4. Replies: 2
    Last Post: 02-28-2009, 03:31 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