Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Access 2003 switchboard

Discussion in 'Information Technology' started by philster, Jul 28, 2006.

  1. philster

    philster
    Expand Collapse
    Guest

    I have an access 2k3 app that I distribute in runtime. Whne I install it on
    a machine with windows 2000 Pro (SP3) when I click on any switchboard item, I
    get the following message:

    "The expression OnClick you entered as the event property setting produced
    the following error: the expression you entered has a function name that
    microsoft access can't find" The onClick function is "=HandleButtonClick(1)"

    Any ides on what the problem is?

    TIA

    Phil
     
  2. Loading...


  3. Allen Browne

    Allen Browne
    Expand Collapse
    Guest

    As you probably know, HandleButtonClick() is part of the code generated by
    the switchboard wizard. The fact that it fails suggests that there is a
    problem with the database. That could be a Name AutoCorrect fault (failure
    to recognise names), or it could be a compilation problem that a Decompile
    would fix (since the A2003 binary is different from the A2000 binary.)

    Suggested sequence:
    1. Uncheck the boxes under:
    Tools | Options | General | Name AutoCorrect
    Explanation of why:
    http://allenbrowne.com/bug-03.html

    2. Compact the database to get rid of this junk:
    Tools | Database Utilities | Compact

    3. Close Access. Make a backup copy of the file. Decompile the database by
    entering something like this at the command prompt while Access is not
    running. It is all one line, and include the quotes:
    "c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
    "c:\MyPath\MyDatabase.mdb"

    4. Open Access, and compact again.

    5. Open a code window.
    Choose References from the Tools menu.
    Uncheck any references you do not need.
    For a list of the ones you typically need in your version of Access, see:
    http://allenbrowne.com/ser-38.html

    6. Still in the code window, choose Compile from the Debug menu.
    Fix any errors, and repeat until it compiles okay.

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "philster" <philster@discussions.microsoft.com> wrote in message
    news:B4283352-9EDB-4538-BAC5-F4A51DA09129@microsoft.com...
    >I have an access 2k3 app that I distribute in runtime. Whne I install it
    >on
    > a machine with windows 2000 Pro (SP3) when I click on any switchboard
    > item, I
    > get the following message:
    >
    > "The expression OnClick you entered as the event property setting produced
    > the following error: the expression you entered has a function name that
    > microsoft access can't find" The onClick function is
    > "=HandleButtonClick(1)"
    >
    > Any ides on what the problem is?
    >
    > TIA
    >
    > Phil
     
  4. philster

    philster
    Expand Collapse
    Guest

    Alllen,

    Thank you for your detailed resonse. Unfortunately, this did not reslove
    my issue. I found MS article 827490 which describes a similar problem if
    access 2003 runtime is installed and then removed. This is in reference to
    access 2002. This is a test machine that Installed the app on. In order to
    install the next version, I had to remove the first installation. Since
    then, subsequent installations produce the error. The test machine did not
    have a previos version of Access installed - just the 2003 RT.

    Thanks,
    Phil

    "Allen Browne" wrote:

    > As you probably know, HandleButtonClick() is part of the code generated by
    > the switchboard wizard. The fact that it fails suggests that there is a
    > problem with the database. That could be a Name AutoCorrect fault (failure
    > to recognise names), or it could be a compilation problem that a Decompile
    > would fix (since the A2003 binary is different from the A2000 binary.)
    >
    > Suggested sequence:
    > 1. Uncheck the boxes under:
    > Tools | Options | General | Name AutoCorrect
    > Explanation of why:
    > http://allenbrowne.com/bug-03.html
    >
    > 2. Compact the database to get rid of this junk:
    > Tools | Database Utilities | Compact
    >
    > 3. Close Access. Make a backup copy of the file. Decompile the database by
    > entering something like this at the command prompt while Access is not
    > running. It is all one line, and include the quotes:
    > "c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
    > "c:\MyPath\MyDatabase.mdb"
    >
    > 4. Open Access, and compact again.
    >
    > 5. Open a code window.
    > Choose References from the Tools menu.
    > Uncheck any references you do not need.
    > For a list of the ones you typically need in your version of Access, see:
    > http://allenbrowne.com/ser-38.html
    >
    > 6. Still in the code window, choose Compile from the Debug menu.
    > Fix any errors, and repeat until it compiles okay.
    >
    > --
    > Allen Browne - Microsoft MVP. Perth, Western Australia.
    > Tips for Access users - http://allenbrowne.com/tips.html
    > Reply to group, rather than allenbrowne at mvps dot org.
    >
    > "philster" <philster@discussions.microsoft.com> wrote in message
    > news:B4283352-9EDB-4538-BAC5-F4A51DA09129@microsoft.com...
    > >I have an access 2k3 app that I distribute in runtime. Whne I install it
    > >on
    > > a machine with windows 2000 Pro (SP3) when I click on any switchboard
    > > item, I
    > > get the following message:
    > >
    > > "The expression OnClick you entered as the event property setting produced
    > > the following error: the expression you entered has a function name that
    > > microsoft access can't find" The onClick function is
    > > "=HandleButtonClick(1)"
    > >
    > > Any ides on what the problem is?
    > >
    > > TIA
    > >
    > > Phil

    >
    >
    >
     
  5. Allen Browne

    Allen Browne
    Expand Collapse
    Guest

    Are you certain there are no broken references, or other issues with that
    machine?

    If not, you could export the form with the undocumented SaveAsText, delete
    it, compact, and then import it using LoadFromText. The syntax looks like
    this:
    SaveAsText acForm, "Form1", "C:\Form1.txt"
    LoadFromText acForm, "Form1", "C:\Form1.txt"
    No guarantees.

    If that does not solve it either, could it have to do with permissions?
    Sandbox mode? Local computer administrator?

    Not sure what else to suggest.

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "philster" <philster@discussions.microsoft.com> wrote in message
    news:42702A68-81DD-4EC4-99DD-665442814C60@microsoft.com...
    > Alllen,
    >
    > Thank you for your detailed resonse. Unfortunately, this did not reslove
    > my issue. I found MS article 827490 which describes a similar problem if
    > access 2003 runtime is installed and then removed. This is in reference
    > to
    > access 2002. This is a test machine that Installed the app on. In order
    > to
    > install the next version, I had to remove the first installation. Since
    > then, subsequent installations produce the error. The test machine did
    > not
    > have a previos version of Access installed - just the 2003 RT.
    >
    > Thanks,
    > Phil
    >
    > "Allen Browne" wrote:
    >
    >> As you probably know, HandleButtonClick() is part of the code generated
    >> by
    >> the switchboard wizard. The fact that it fails suggests that there is a
    >> problem with the database. That could be a Name AutoCorrect fault
    >> (failure
    >> to recognise names), or it could be a compilation problem that a
    >> Decompile
    >> would fix (since the A2003 binary is different from the A2000 binary.)
    >>
    >> Suggested sequence:
    >> 1. Uncheck the boxes under:
    >> Tools | Options | General | Name AutoCorrect
    >> Explanation of why:
    >> http://allenbrowne.com/bug-03.html
    >>
    >> 2. Compact the database to get rid of this junk:
    >> Tools | Database Utilities | Compact
    >>
    >> 3. Close Access. Make a backup copy of the file. Decompile the database
    >> by
    >> entering something like this at the command prompt while Access is not
    >> running. It is all one line, and include the quotes:
    >> "c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
    >> "c:\MyPath\MyDatabase.mdb"
    >>
    >> 4. Open Access, and compact again.
    >>
    >> 5. Open a code window.
    >> Choose References from the Tools menu.
    >> Uncheck any references you do not need.
    >> For a list of the ones you typically need in your version of Access, see:
    >> http://allenbrowne.com/ser-38.html
    >>
    >> 6. Still in the code window, choose Compile from the Debug menu.
    >> Fix any errors, and repeat until it compiles okay.
    >>
    >> "philster" <philster@discussions.microsoft.com> wrote in message
    >> news:B4283352-9EDB-4538-BAC5-F4A51DA09129@microsoft.com...
    >> >I have an access 2k3 app that I distribute in runtime. Whne I install
    >> >it
    >> >on
    >> > a machine with windows 2000 Pro (SP3) when I click on any switchboard
    >> > item, I
    >> > get the following message:
    >> >
    >> > "The expression OnClick you entered as the event property setting
    >> > produced
    >> > the following error: the expression you entered has a function name
    >> > that
    >> > microsoft access can't find" The onClick function is
    >> > "=HandleButtonClick(1)"
     
  6. philster

    philster
    Expand Collapse
    Guest

    Allen,

    You guessed it this time!! Thanks!! I had created a registry entry for
    sandboxmode = 3 to surpress some dialogue boxes for Win XP . This causes the
    error in Win 2K. Good news is that with the registry entry removed I don't
    get the dialogues in Win 2K.

    Phil

    "Allen Browne" wrote:

    > Are you certain there are no broken references, or other issues with that
    > machine?
    >
    > If not, you could export the form with the undocumented SaveAsText, delete
    > it, compact, and then import it using LoadFromText. The syntax looks like
    > this:
    > SaveAsText acForm, "Form1", "C:\Form1.txt"
    > LoadFromText acForm, "Form1", "C:\Form1.txt"
    > No guarantees.
    >
    > If that does not solve it either, could it have to do with permissions?
    > Sandbox mode? Local computer administrator?
    >
    > Not sure what else to suggest.
    >
    > --
    > Allen Browne - Microsoft MVP. Perth, Western Australia.
    > Tips for Access users - http://allenbrowne.com/tips.html
    > Reply to group, rather than allenbrowne at mvps dot org.
    >
    > "philster" <philster@discussions.microsoft.com> wrote in message
    > news:42702A68-81DD-4EC4-99DD-665442814C60@microsoft.com...
    > > Alllen,
    > >
    > > Thank you for your detailed resonse. Unfortunately, this did not reslove
    > > my issue. I found MS article 827490 which describes a similar problem if
    > > access 2003 runtime is installed and then removed. This is in reference
    > > to
    > > access 2002. This is a test machine that Installed the app on. In order
    > > to
    > > install the next version, I had to remove the first installation. Since
    > > then, subsequent installations produce the error. The test machine did
    > > not
    > > have a previos version of Access installed - just the 2003 RT.
    > >
    > > Thanks,
    > > Phil
    > >
    > > "Allen Browne" wrote:
    > >
    > >> As you probably know, HandleButtonClick() is part of the code generated
    > >> by
    > >> the switchboard wizard. The fact that it fails suggests that there is a
    > >> problem with the database. That could be a Name AutoCorrect fault
    > >> (failure
    > >> to recognise names), or it could be a compilation problem that a
    > >> Decompile
    > >> would fix (since the A2003 binary is different from the A2000 binary.)
    > >>
    > >> Suggested sequence:
    > >> 1. Uncheck the boxes under:
    > >> Tools | Options | General | Name AutoCorrect
    > >> Explanation of why:
    > >> http://allenbrowne.com/bug-03.html
    > >>
    > >> 2. Compact the database to get rid of this junk:
    > >> Tools | Database Utilities | Compact
    > >>
    > >> 3. Close Access. Make a backup copy of the file. Decompile the database
    > >> by
    > >> entering something like this at the command prompt while Access is not
    > >> running. It is all one line, and include the quotes:
    > >> "c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
    > >> "c:\MyPath\MyDatabase.mdb"
    > >>
    > >> 4. Open Access, and compact again.
    > >>
    > >> 5. Open a code window.
    > >> Choose References from the Tools menu.
    > >> Uncheck any references you do not need.
    > >> For a list of the ones you typically need in your version of Access, see:
    > >> http://allenbrowne.com/ser-38.html
    > >>
    > >> 6. Still in the code window, choose Compile from the Debug menu.
    > >> Fix any errors, and repeat until it compiles okay.
    > >>
    > >> "philster" <philster@discussions.microsoft.com> wrote in message
    > >> news:B4283352-9EDB-4538-BAC5-F4A51DA09129@microsoft.com...
    > >> >I have an access 2k3 app that I distribute in runtime. Whne I install
    > >> >it
    > >> >on
    > >> > a machine with windows 2000 Pro (SP3) when I click on any switchboard
    > >> > item, I
    > >> > get the following message:
    > >> >
    > >> > "The expression OnClick you entered as the event property setting
    > >> > produced
    > >> > the following error: the expression you entered has a function name
    > >> > that
    > >> > microsoft access can't find" The onClick function is
    > >> > "=HandleButtonClick(1)"

    >
    >
    >
     

Share This Page