in reply to Problem to open form in Access

Your error message consists of two concatenated strings:

  1. Impossible d'ouvrir le formulaire: - You wrote this, so it would appear that $access_obj->DoCmd->OpenForm('Formulaire1') was not successful. As you used warn, your code continued but possibly with bogus -- undefined, empty, etc. -- data.
  2. You also wrote $! which interpolated as "No such file or directory". This error is often resolved by supplying a relative ../Formulaire1 or absolute /some/path/to/Formulaire1 pathname. Furthermore, your OS may ignore filename extensions then act dumb when you supply it with exactly the same filename strings that it supplies to you: you may need to specify Formulaire1 as Formulaire1.XXX (where XXX is the hidden extension).

-- Ken

Replies are listed 'Best First'.
Re^2: Problem to open form in Access
by Anonymous Monk on Jun 29, 2012 at 17:17 UTC
    Furthermore, your OS may ignore filename extensions
    Worst. Default. Ever.
Re^2: Problem to open form in Access
by x-lours (Sexton) on Jul 03, 2012 at 14:12 UTC

    thanks for advices.

    1. i do 'warn' instead of 'die' because i want access to close normally, further lines later.

    2. the form 'formulaire1' is inside access so i can't imagine the path for it. i try ./formulaire1 and obtain :

    OLE exception from "<Unknown Source>": Le nom de formulaire './Formulaire1' entré dans la feuille des propriétés ou dans une macro est mal orthographié ou fait référence à un formulaire inexistant. Win32::OLE(0.1709) error 0x800a0836 in METHOD/PROPERTYGET "OpenForm" at lancer_TU_version14.pl line 1312 Impossible d'ouvrir le formulaire:No such file or directory

    obviously, if i search for it, i didn't find the form 'formulaire1' in the OS files.
      i added my $var = <STDIN>; to see my messages, and i discover that the form was open !!!

      i try to get the value of the $access_obj->DoCmd->OpenForm('Formulaire1'); it is null (undef). that is why i get the warning message ...

      so the post can be closed. (how ?)

      Access application doesn't return a value for this call, and a 'action to wait' is needed.