Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

How open forms using certain criteria

I have a command button on a form which when clicked I want to have a second form open to display only certain records.  Here is my code which is not working.

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frmPrintOrdTranx"
    DoCmd.OpenForm stDocName, acNormal, , [Type] = "P", acFormEdit, acWindowNormal

Can some please help?
ASKER CERTIFIED SOLUTION
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Steve,
Try this
DoCmd.OpenForm stDocName, acNormal, , "[Type] = 'P'", acFormEdit, acWindowNormal