• Format function in reports (2000)

    Author
    Topic
    #423649

    I have a Gross Sales Report that works perfectly while under development in a Win2K environment using Access 2000. When I “package” it with the Access Runtime Library (ART), and install it under a WinXP (either Home or Pro), the report generates “#Name?” in every text box control that uses a Format function call in the Control Source field. Specifically, the following two Control Source values:

    =Format$([InvoiceDate],”Long Date”,0,0)
    =Format(Sum([InvoiceProductTotal]),”$#,###.00″)

    My assumption (which is probably wrong) is that the DLL that contains the Format function is either missing or severely downgrade in the ART library. BTW, I do run an Office Update against the installed ART library, which does install two ART updates currently available from Microsoft. Still fails.
    Questions:
    1) Which DLL contains the Format function? Is there a utility program available that can list a DLL’s entrypoints?
    2) Has anyone else experienced any parallel problems porting Access 2K (with or without ART) into WinXP? If so, did you solve the problem, and how?

    Thanks, Jim

    Viewing 0 reply threads
    Author
    Replies
    • #970510

      This sounds like you might have a reference that is broken in the destination setup but not on your machine. Format is a built in function of VBA, and it is not crippled in the runtime. However, other references that are broken will cause the built in functions to fail. If I read your post correctly, the runtime installs and works on Win 2k but not on WinXP, which suggests that you have neglected to package some bits that are not there by default in XP or you have used something that can’t be guaranteed to exist on all target machines (CDO and Outlook spring to mind, for instance). Without knowing more about what is included in your package and whether any MDE files are involved, any common controls, Office apps, etc., there is no way for us to pinpoint the problem. sorry

      • #970637

        Charlotte,

        For what it’s worth, I converted all my calls to “Format” to calls to “FormatDateTime” and “FormatCurrency”, and everything started working as expected!!

        In further description of the environment(s), the development (and initial test) are done under Access 2K Premium on a Win2K system. All the latest MS updates are installed for both the system and for Office. When I package the system, all access files have been converted to MDE form and all startup (Tools menu) option checkboxes set clear. I do have an extensive internal logging system to aid & abet the debug process.

        Since I am unaware of any “bits to package” that are unique to XP, I am not doing so. Perhaps you could expand on what you mean there, and/or guide me to any special requirements documents for running Access 2K applications under XP. I had always been under the impression that the XP environment was downward compatible for all Access 2K applications, including ART usage. If I am mistaken, please enlighten me…

        As to other packaged components, the only one I optionally use is Excel. Before I allow the user to invoke Excel functions, I dynamically test for the presence of Excel (usually absent if only ART available), and set the relevant controls disabled if Excel is missing.

        There are other problems that are now “rearing their heads” in the XP environment, and if I can’t solve them soon, I’ll return here with their descriptions as well (under a new thread).

        Again, any further insights are gratefully accepted!

        Thanks, Jim

        • #970683

          If you are using code specific to Excel or if you have a reference to the Excel object library, then it isn’t enough to disable the controls. The reference will still be broken and that will cause the kind of behavior you see. If you database is an MDE, you can’t even remove the reference. You should also be aware that references to MDEs that wind up in a different location that the original path on the development machine will not resolve properly in a runtime environment, even though they appear to. Among the differences between Win2k and WinXP are the name of the Windows folder, so if you have references to objects in the Windows folder, you can run afoul of that difference. Similarly, the Documents and Settings folder is in the user profile in Win2k but is in the root directory in WinXP.

    Viewing 0 reply threads
    Reply To: Format function in reports (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: