Results 1 to 14 of 14
  1. #1
    har203 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2020
    Posts
    8

    Crossover, open SuSE linux, Access 2007: OnClick cannot be executed

    I am an newbee. I want to ask about an ACCESS problem only under crossover not windows.



    I know this is not the correct forum. But it is the environment of Access that causes the error.

    - openSuSE Linux tumbleweed (updates till 2020-01-20)
    - Microsoft Office 2007 and 2010
    - crossover 18.5.0.1 (rpm version) (I can not install crossover 19 on open SuSE due to installation errors)
    --> an simulation software of windows under linux

    The access-application is running under windows XP, 7, 8 ,10 with MSOffice 2007 and 2010 fine. But when I copy the file to linux and execute with MSACCESS (also 2007, 2010 (x86 and x64)) the form is not running.

    It is the first step of the form:

    I see a menu with options of selections for entering sub-forms (a normal menu function).
    Immediately when clicking on one selection I get error message (even exit button):

    The expression On Click you entered as the event property setting produced the following error: .
    * The expression may not result in the name of a macro , the name of a user-defined function or [Event Procedure]
    * There may have been an error evaluating the function, event , or macro.

    Even the EXIT-form macro:

    Private Sub Exit_Click()
    On Error GOTO Err_Exit_Click
    DoCmd.Quit
    Exit_Exit_Click:
    Exit Sub
    Err_Exit_Click:
    MsgBox Err.Description
    Resume Exit_Exit_Click
    End Sub


    I told you that everything is working fine on windows computers. In Access (windows and Iinux) I can enter the program mode and can compile this form without any error.

    I tried complete Office-version 2007, 2010 (x86 and x64) and also runtime environment access 2007 (german and english) and 2010. Always the same problem.

    The debug mode of access can not help, because the click event produces no message.

    thank Harald

  2. #2
    Ajax is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    7,990
    can you clarify what you mean by 'compile the form' - you compile the whole code for the application, not code for a specific form. Also - does this apply to all code or just this one event?

    suggest disable your error handling for now and step through the code

    The error you are getting implies a missing or incorrect library - The fact the code works in the windows environment says to me that it is not an access issue as such but one created by running in the crossover environment.

    I've heard that using a non english language can cause this issue, I believe the solution is to import all objects into a new database.

    Other possibility is using reserved words or the same name for different objects - although I see no evidence that this may be the case here

    It would be a different error message, but have you set trusted locations?

  3. #3
    har203 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2020
    Posts
    8
    My access is in german. Therefore I translate all text / options. Maybe they are in english version a little bit different.
    For me it look like the visual basic interpreter will not start or do not execute commands or do not recognize build in commands.

    The click is recognized - see the error message that there is something wrong with OnClick-entry.

    > can you clarify what you mean by 'compile the form' - you compile the whole code for the application, not code for a specific form. Also - does this apply to all code or just this one event?

    In mode for programming (Alt-F11) I have the option "Debug" and there is the first menu option "compile" and this is compiling without any error.
    My application consists only of one table with customers. There are no other programs or sources.

    > suggest disable your error handling for now and step through the code

    My problem is that the application starts with a menu for selecting sub-forms and this error starts at the first click at all. So there are no debug information. By disabling all errors you mean: Program mode (Alt F11) -> extras -> options -> general -> Break at errors (first selected): at all errors

    > The error you are getting implies a missing or incorrect library - The fact the code works in the windows environment says to me that it is not an access issue as such but one created by running in the crossover environment.

    Me too. I think that something in the environment is different. I tried language options (german/english) - difference. Maybe really
    I compared the selection of "links" (Alt-F11-> extras -> links (first option of option extras). There are five options selection - the same like in windows: VisualBasic, MSAccess12ObjectLibrary, OLE Automation, MSActiveXDataObjects2-1Library, MSVisualBasicforApplicationextensibility5.3

    > I've heard that using a non english language can cause this issue, I believe the solution is to import all objects into a new database.

    I tried access in english but the same result.

    > Other possibility is using reserved words or the same name for different objects - although I see no evidence that this may be the case here

    No, we always use the name of an object like "form_kundendatenbank" or "kundendatenbank_click" or "command_167" ...

    > It would be a different error message, but have you set trusted locations?

    yes, this is set in access options -> trust center -> options of trust center -> trusted locations

    thanks Harald

  4. #4
    Ajax is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    7,990
    > I've heard that using a non english language can cause this issue, I believe the solution is to import all objects into a new database.

    I tried access in english but the same result.
    suggest try the solution

    For me it look like the visual basic interpreter will not start or do not execute commands or do not recognize build in commands.
    check your libraries - they can have different version numbers for different access versions

    By disabling all errors you mean: Program mode (Alt F11) -> extras -> options -> general -> Break at errors (first selected): at all errors
    No - I mean comment out or remove all the error handling code

    your code looks like you wrote a macro which you then converted to VBA - if this is the case, delete the vba and recreate removing all lines except 'DoCmd.Quit'

    T
    he click is recognized - see the error message that there is something wrong with OnClick-entry.
    you said that before - I'm asking if it applies to all click events, or just this one

    If necessary, remove the first step so you can activate other events

  5. #5
    har203 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2020
    Posts
    8
    Quote Originally Posted by Ajax View Post
    suggest try the solution

    check your libraries - they can have different version numbers for different access versions

    No - I mean comment out or remove all the error handling code

    your code looks like you wrote a macro which you then converted to VBA - if this is the case, delete the vba and recreate removing all lines except '[COLOR=#333333]DoCmd.Quit'

    you said that before - I'm asking if it applies to all click events, or just this one

    If necessary, remove the first step so you can activate other events
    From the crossover forum I have heard that this is a known bug.
    I will send you the solution when problem has been solved.

  6. #6
    har203 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2020
    Posts
    8
    I created a small min application with only one table, one form on trigger (onLoad):

    Code:
    
    
    Code:
    Private Sub Form_Load()
      DoCmd.Beep
    End Sub


    https://app.box.com/s/68teomls05j7hmnhzvdocbztqwe833pn

    *) I eliminated all special characters of german language of form and of table columns
    *) I tried with english version of Microsoft Outlook 2007
    *) I tried ACCESS with option /decompile
    *) English version: In access-options I switch macro execution of trusted locations again on
    *) In access-option: I switch all macros ON

    I am one step farther:

    When going in "program mode" (Alt-F11) and entering (immediate window) (Ctrl-G) I can examine commands:

    DoCMD.BEEP ist working,

    but

    ?SysCmd(acSysCmadAccessDir) is not working - under windows it is working

    ==> compile error: sub or function not defined

    You mean that I should check DLL versions. how can I do this.
    I think that a library or package of windows is missing.

    Thanks Harald

  7. #7
    Ajax is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    7,990
    not sure what you are saying.

    In your previous post you said 'From the crossover forum I have heard that this is a known bug.'

    I asked you to check your libraries, but you did not respond

    but to try and help the value of
    acSysCmdAccessDir is 9 so try

    ?SysCmd(9)

    if that works then the implication is the problem is with your
    acSysCmdAccessDir variable (I presume your misspelling of it is a typo as you would get a different error with a different spelling)

    Syscmd (and the
    acSysCmdAccessDir constant) can be found in the Microsoft Access XX.X Object Library (XX.X=14.0 for 2010) so this should listed in your references. Since DoCmd is in the same library and you say works, I would expect the library to be there.

    for 32bit 2010 access, the library file can be found here C:\Program Files (x86)\Microsoft Office\Office14\ and is called MSACC.OLB

    for other versions of access, the 14 will be different (I think 2007 is 12) and it is a different path for 64bit access

    for future reference you can find all this out in the vba object browser (hit F2 or click on the view menu in the vba window)

    If all appears to be there, suggest copy the msacc.olb file from somewhere else or reinstall access as it may be the file is corrupted

    If none of those work, then the implication to me is that crossover is in some way preventing the library to open or open properly - the known bug. You may have to deinstall and ensure the Office14 (or it's equivalent) has had all access related files removed




  8. #8
    har203 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2020
    Posts
    8
    Now I am totally confused:

    I installed another trigger "Click" on first field that I can check a command at runtime not only at startup.

    ?SysCmd(9) and ?SysCmd(acSysCmdAccessDir) sometimes works and sometimes not.

    But in both cases my trigger has always the recognized error message.

  9. #9
    har203 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2020
    Posts
    8
    Quote Originally Posted by Ajax View Post
    not sure what you are saying.
    In your previous post you said 'From the crossover forum I have heard that this is a known bug.'


    I have not received my last replies. This problem is not known. It is an other problem.
    I wrote about 3 replies but did not see them in this thread.

    I asked you to check your libraries, but you did not respond
    [
    How can I check version numbers of libraries, which libraries and check version number against what version number

    but to try and help the value of
    acSysCmdAccessDir is 9 so try
    ?SysCmd(9)





    if that works then the implication is the problem is with your
    acSysCmdAccessDir variable (I presume your misspelling of it is a typo as you would get a different error with a different spelling)

    Syscmd (and the
    acSysCmdAccessDir constant) can be found in the Microsoft Access XX.X Object Library (XX.X=14.0 for 2010) so this should listed in your references. Since DoCmd is in the same library and you say works, I would expect the library to be there.

    for 32bit 2010 access, the library file can be found here C:\Program Files (x86)\Microsoft Office\Office14\ and is called MSACC.OLB

    for other versions of access, the 14 will be different (I think 2007 is 12) and it is a different path for 64bit access

    for future reference you can find all this out in the vba object browser (hit F2 or click on the view menu in the vba window)

    If all appears to be there, suggest copy the msacc.olb file from somewhere else or reinstall access as it may be the file is corrupted

    If none of those work, then the implication to me is that crossover is in some way preventing the library to open or open properly - the known bug. You may have to deinstall and ensure the Office14 (or it's equivalent) has had all access related files removed



    [/QUOTE]

  10. #10
    Ajax is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    7,990
    your post is all mixed up so difficult to see what you are asking

    you seem to be asking

    How can I check version numbers of libraries, which libraries and check version number against what version number
    libraries can be found in the vba window by clicking on tools>references

    or in project explorer, having searched for say 'acsyscmddir' in the window below you will see

    Const acSysCmdAccessDir = 9
    Member of Access.AcSysCmdAction

    Click on Access.AcSysCmdAction and you will see

    Library Access
    C:\Program Files (x86)\Microsoft Office\Office14\MSACC.OLB
    Microsoft Access 14.0 Object Library



    see this link for which library versions match access versions
    https://www.fmsinc.com/MicrosoftAcce...y/features.htm

  11. #11
    har203 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2020
    Posts
    8
    I already wrote which libraries I have in tools->references.

    *) Visual Basic For Applications
    *) Microsoft Access 12.0 Object Library
    *) OLE Automation
    *) Microsoft Office 12.0 Access database engine Object Library

    in directory "Program Files\Microsoft office\Office12" I have following OLB-files:
    GRDE50.OLB
    GREN50.OLB
    MSACC.OLB
    MSOUTL.OLB
    MSPPT.OLB
    MSWORD.OLB
    XL5DE32.OLB
    XL5EN32.OLB

    I don't think that those libraries are corrupted, because I tried Office 2007 (a version in german, one in english), Office 2010 (german only).
    I installed V 18.1.0-1 and V 18.5.0-1 too and tried both versions.

    In project explorer I see only (minimal application with 3 triggers)

    --> AlarmDB1
    ----> Microsoft office class object
    ------> Form_AlarmkundenConst acSysCmdAccessDir = 9

    I see in option menu of projects only one entry "(name) / AlarmDB1" for the hole project entry. But cannot search something.
    Where (which window) I shall search for "acsyscmddir" to see value of "Member of Access.AcSysCmdAction" and "Library Access".

    The libraries I check with my windows 10 computer: looks they are the same an have same creation date (it is the same installation for same CD)

    I made a quick try if something changes:

    On a windows 2010 computer I have a complete installed Office 2007 (sure it is installed from the same CD).
    I copied the hole part of windows "\Program Files\Microsoft Office\*.*" to linux computer and tried Access.
    Acces is running but

    --> same error

  12. #12
    har203 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2020
    Posts
    8
    Somebody had same problem:

    https://www.codeproject.com/Question...MS-Access-form

    There is a suggestion to check references to MS Office Object Library.
    How to do ? What to check ? How should the reference look like ?

    I found an article with problem that links were missing: I have following links selected (Extras -> Links):

    *) Visual Basic for Applications
    *) Microsoft Access 12.0 Object Library
    *) OLE Automation
    *) Microsoft Office 12.0 Access database engine Object Library

  13. #13
    Ajax is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    7,990
    There is a suggestion to check references to MS Office Object Library.
    How to do ? What to check ? How should the reference look like ?
    as already advised - and as you say you see

    *) Visual Basic for Applications
    *) Microsoft Access 12.0 Object Library
    *) OLE Automation
    *) Microsoft Office 12.0 Access database engine Object Library
    then it would appear you are not missing a reference - v12.0 is access 2007 - as already explained, syscmd is in the Microsoft Access 12.0 Object Library

    if you go into the vba object browser (not project explorer) and search for syscmd - is it found?

    if you have replaced msacc.olb as I suggested then it would appear there is a bug in crossover

    If you provide a link to the crossover bug you identified, I might be able to suggest something else. But as of now, I am out of ideas

  14. #14
    Ajax is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    7,990
    I've just taken a look at crossover - one of the things that would make a difference is the version of linux - according to this site they are Debian, Fedora, Mint, Red Hat Enterprise Linux (RHEL) and Ubuntu, you appear to be using SuSE?. https://www.zdnet.com/article/how-to-run-windows-programs-on-linux-with-crossover/

    Linux is not my speciality so can't really help you with that.

    I see you have crossposted here https://www.codeweavers.com/support/...=26;msg=224025. It would have been very helpful if you had advised me of that.

    Since I don't believe I can help anymore, I shall drop out

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

Similar Threads

  1. Replies: 8
    Last Post: 06-18-2019, 10:26 AM
  2. Report won't open on OnClick from Search Form
    By ScottySchultz in forum Access
    Replies: 2
    Last Post: 01-30-2018, 07:42 PM
  3. Replies: 10
    Last Post: 04-26-2016, 02:04 PM
  4. MS 2007 files won't open from VBA in Access 2007
    By gopherking in forum Programming
    Replies: 1
    Last Post: 02-24-2012, 02:44 PM
  5. OnClick open
    By Molly152 in forum Forms
    Replies: 5
    Last Post: 11-18-2010, 10:32 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums