@Command läuft auf Fehler

  • Hallo zusammen,


    ich habe mir mal den folgenden Eintrag angeschaut.


    http://searchdomino.techtarget…83,sid4_gci860642,00.html


    Grundsätzlich klingt es ja richtig gut, Subform je nach Variable ein- oder ausblenden zu lassen.


    Eingebaut funktioniert das ganze jedoch nicht wirklich, da beim Klick auf den Button, der die Action starten soll, eine Fehler:


    "Cannot execute the specific command"


    Kann sich von Euch jemand erklären, warum das ganze auf einen Fehler läuft?


    MFG


    Der Lord

  • Hallo zusammen,


    anbei der Code den ich verwende.


    Natürlich habe ich "myform" durch die Bezeichnung meiner Form geändert.


    Auch SUB1 und SUB2 habe ich natürlich entsprechend auf meine Datenbank angepasst.


    # Open the form "myForm"
    # Create a Computed Subform with the formula:
    @If(@Environment("myVar") = "Y" ; "Sub1" ; "Sub2")
    # Create two Actions with the following formulas, respectively:
    "Show Sub1"
    @Environment("myVar" ; "Y");
    @Command( [ViewSwitchForm] ; "myForm" )
    and "Show Sub2"
    @Environment("myVar" ; "N");
    @Command( [ViewSwitchForm] ; "myForm" )


    Danke und Grüße


    Der Lord

  • Hallo Taurec,


    die Zeilen habe ich nicht mit im Code.


    Auch nicht als ausgeklammerte Kommentare oder so.


    Als einzige Inhalte habe ich hinterlegt:


    In der Computed Subform:
    @If(@Environment("myVar") = "Y" ; "Sub1" ; "Sub2")


    Action 1:
    @Environment("myVar" ; "Y");
    @Command( [ViewSwitchForm] ; "myForm" )


    Action 2:
    @Environment("myVar" ; "N");
    @Command( [ViewSwitchForm] ; "myForm" )


    myForm habe ich ersetzt mit dem Formnamen, welchem die Subform angezeigt werden soll, daher quasi in der gleichen Form.


    MFG


    Der Lord

  • Du verwendest das @Command aber nicht zufälligerweise im Web?

    Life is not a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming "Wow, what a ride!!! :evil:
    Beschleunigung ist, wenn die Tränen der Ergriffenheit waagrecht zum Ohr hin abfliessen - Walter Röhrl