ACCESS: Afficher les états sans l'interface ACCESS en arrière

Fermé
Rodigue_army Messages postés 10 Date d'inscription vendredi 24 octobre 2014 Statut Membre Dernière intervention 28 décembre 2014 - 28 déc. 2014 à 19:18
Bonjour,
J'ai un soucis que tenté de résoudre ailleurs en vain alors je l'apporte ici:

1-Pour masquer mon "interface ACCESS", voici le code que j'ai inséré dans un "MODULE":

"Option Compare Database

'Déclaration API
Const SW_HIDE = 0 'Hide the window.
Const SW_MAXIMIZE = 3 'Maximize the window.
Const SW_MINIMIZE = 6 'Minimize the window.
Const SW_RESTORE = 9 'Restore the window (not maximized nor minimized).
Const SW_SHOW = 5 'Show the window.
Const SW_SHOWMAXIMIZED = 3 'Show the window maximized.
Const SW_SHOWMINIMIZED = 2 'Show the window minimized.
Const SW_SHOWMINNOACTIVE = 7 'Show the window minimized but do not activate it.
Const SW_SHOWNA = 8 'Show the window in its current state but do not activate it.
Const SW_SHOWNOACTIVATE = 4 'Show the window in its most recent size and position but do not activate it.
Const SW_SHOWNORMAL = 1 'Show the window and activate it (as usual).


Public Declare Function ShowWindow Lib "User32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long


'minimise la fenetre access et active le formulaire
Function Fenetre_Modale(pForm As Form)
ShowWindow Application.hWndAccessApp, SW_HIDE
ShowWindow pForm.hWnd, SW_SHOWNORMAL
ShowWindow Application.hWndAccessApp, SW_SHOWMINNOACTIVE

End Function"

2-Pour afficher mes formulaire sans ACCESS en arrière plan, voici le code que j'ai inséré dans le générateur de code des formulaire:
"Private Sub Form_Load()
'Ouverture du formualire sans la fenêtre principale Access
ShowWindow Application.hWndAccessApp, 0
End Sub"

3-Maintenant les formulaires s'affichent seul et sans aucun problèmes.
PROBLEME: DèS QUE JE LANCE L'OUVERTURE DES ETATS A PARTIR DES BOUTON COMMANDES SUR FORMULAIRES, NON SEULEMENT CES ETATS NE S'OUVRENT PAS MAIS LES LES FORMULAIS SONT FIGES M'OBLIGEANT A REDÉMARRER MON PC.
Alors n'y a t-il pas un code comme en 2-, me permettant d'ouvrir ces états sans que ma BD se fige?
Merci j'attends vivement vos réponses