Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access 2000 and SP-3 Bug (2000 SP-3)

    Let me see if I have this right,

    The first line of your Autoexec macro tells your application to quit if the function basSetEnvironment returns a value of 0, otherwise the macro continues with the startup. Correct?

    Can you post your basSetEnvironment code? it sounds like that the problem amy lie in the function.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Access 2000 and SP-3 Bug (2000 SP-3)

    It sounds like you are trying to some some sort of setup issue with your "autoexec" macro - what do you mean by the environment being set up? And by runtime applications, do you mean that the PC is not required to have Access 2000 installed? Or do you mean an MDE with only compiled code, but requiring that you have Access installed to run the application?
    Wendell

  3. #3
    New Lounger
    Join Date
    Jan 2003
    Location
    Sydney, New South Wales, Australia
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access 2000 and SP-3 Bug (2000 SP-3)

    After upgrading Office 2000 to SP-3 on my system a number of Access 2000 Runtime applications (using MDE files generated using Access 2000 SR-1) stop working. When the applications start I get the message "The expression you entered has a function name that 'appname' can't find." where 'appname' is the name of the application.

    If I recreate the MDE using Access 2000 at SP-3 level then in works OK on systems that have been upgraded to SP-3 but not on systems that are still on SR-1! I get the same message on systems with SR-1 when I try to use a MDE generated on SP-3.

    All of these applications use the same startup processes which consist of an "autoexec" macro that includes a "basSetEnvironment()=0" condition function with a "Quit" action in the first line of the macro. This is so if the environment can't be set up the application terminates however it appears that the system can't find the function if the MDE and the Access Runtime modules are not at the same version (SR-1 or SP-3). I have never tried this with SP-2 so I don't know if the same problem exists with it.

    Anyone else having this problem and is there a solution? Makes it very difficult if users can upgrade to SP-3 and break Access runtime applications and I can't upgrade without potentially breaking the application or forcing users to upgrade to SP-3.

    Any ideas?

    *** Expansion on problem added 30/01/2003 ***

    Exact message I get is: "The expression you entered has a function name that xxxxx can't find." where xxxxx is the name of the application.

    Problem environment #1 - Access 2000 Runtime only at SR-1 level with development system where MDE files are created running Access 2000 (as part of Office Developer) at SP3.
    Problem environment #2 - Access 2000 (as part of Office Developer) at SP3 with development system where MDE files are created running Access 2000 (as part of Office Developer) at SR-1.
    Problem environment #3 - Access 2000 (as part of Office Developer or Professional) at SR-1 with development system where MDE files are created running Access 2000 (as part of Office Developer) at SP3.

    Don't have any Runtime only systems at SP3 as I was not going to implement it until all systems tested ok. Even then it has to be a gradual implementation so I will have a mix of SR-1 and SP3 machines for a while.

    Autoexec macro looks like this: Line 1 Condition: basSetEnvironment()=0 Action: quit
    Line 2 Condition: (none) Action: Openform XXXX (to open the main form)

    If the basSelEnvironment option returns 0 (false meaning it didn't work) then the application quits.

    The basSetEnvironment function is as follows (plus a bunch of declares, etc in the same module):

    Public Function basSetEnvironment()
    ' This function sets the Microsoft Access Environment Options

    Const DB_Text As Long = 10

    Dim lintLockCount As Integer
    Dim lintResp As Integer
    Dim lintI As Integer
    Dim lstrAppIcon As String

    Dim lstrProc As String
    lstrProc = "basSetEnvironment()"

    basSetEnvironment = False

    On Error GoTo vbErrorRoutine

    Re1:
    lintResp = basSaveOptions()

    lintI = basAddAppProperty("AppTitle", DB_Text, gstrToolName)
    lstrAppIcon = Application.CurrentProject.Path & "" & gstrAppIcon
    lintI = basAddAppProperty("AppIcon", DB_Text, lstrAppIcon)
    Application.RefreshTitleBar

    gstrSystemDateFormat = basGetSystemDateFormat()
    If LCase$(gstrSystemDateFormat) <> "dd/MM/yyyy" Then
    lintResp = basSetSystemDateFormat("dd/MM/yyyy")
    End If

    gstrTemplateFileName = Application.CurrentProject.Path & "TEMPLATE.HTML"

    basSetEnvironment = True

    ExitFunction:
    Exit Function

    vbErrorRoutine:
    If Err = 2740 _
    Or Err = 2800 _
    Or Err = 3006 _
    Or Err = 3008 _
    Or Err = 3046 _
    Or Err = 3158 _
    Or (Err >= 3186 And Err <= 3189) _
    Or Err = 3205 _
    Or Err = 3218 _
    Or Err = 3260 _
    Or Err = 3330 _
    Or Err = 7752 Then
    lintLockCount = lintLockCount + 1
    If lintLockCount > 1 Then
    lintResp = MsgBox(gstrCompanyID & " " & gstrToolName & " is unable to Login due to a Lock Conflict.(Hint: Cancelling will exit to Windows)", vbExclamation + vbRetryCancel, "Login table Locked")
    If lintResp = vbCancel Then
    Resume ExitFunction
    End If
    End If
    DBEngine.Idle DB_FREELOCKS
    Resume Re1
    Else
    MsgBox gstrCompanyID & " " & gstrToolName & " experienced the following Error: " & Error$ & " in procedure " & lstrProc, vbCritical, "Application Error !"
    End If
    Resume ExitFunction
    End Function

Posting Permissions

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