help open form invisible

M

mhmaid

hi every one
any one can help me with this code so that it opens the form invisibe"
invoice register 2005"

Private Sub LTRNO_Exit(Cancel As Integer)
strDocName = "invoice register 2005"
strLinkCriteria = "[LTR NO] = FORMS![Expense Reports].[LTRNO]"
DoCmd.OpenForm strDocName, , , strLinkCriteria
End Sub

thank you
 
A

Allen Browne

Use the WindowMode argument:

DoCmd.OpenForm strDocName, WhereCondition:=strLinkCriteria,
WindowMode:=acHidden
 
K

Klatuu

In the Load event of your invoice register 2005 form, enter this:
Me.Visible = False
 
Top