How i use this code in access 2007 pls
For Example, I have frmForm1 and frmForm2, will the codes below work?
stDocName = "frmForm1"
stDocName = "frmForm2"
stLinkCriteria = "[tblTestIndex.Lab No]=" & "'" & Me![tblTestIndex.LAB
NO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.PrintOut
DoCmd.Close
For Example, I have frmForm1 and frmForm2, will the codes below work?
stDocName = "frmForm1"
stDocName = "frmForm2"
stLinkCriteria = "[tblTestIndex.Lab No]=" & "'" & Me![tblTestIndex.LAB
NO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.PrintOut
DoCmd.Close