Filter Report

elfranzen

Registered User.
Local time
Today, 10:52
Joined
Jul 26, 2007
Messages
93
I do i get this to filter only the one record I want?
Code:
Private Sub Score_Exit(Cancel As Integer)

UPDATESCOREPRINT = CardNumber2.Value


DoCmd.OpenReport "customerreceiptreprint", acViewNormal, CardNumber2 = UPDATESCOREPRINT, , acHidden
DoCmd.OpenReport "receiptreprint", acViewNormal, CardNumber2 = UPDATESCOREPRINT, , acHidden
Debug.Print UPDATESCOREPRINT
DoCmd.Close
DoCmd.OpenForm "EntryForm", acNormal, , , acFormAdd, acWindowNormal

End Sub

Also it Errors on dmcmd.close
 
This is how I got it to work but I still get an error on the DoCmd.Close why is this.
Code:
Private Sub Score_Exit(Cancel As Integer)

UPDATESCOREPRINT = CardNumber2.Value


DoCmd.OpenReport "customerreceiptreprint", acViewNormal, , "[CardNumber2] = '" & UPDATESCOREPRINT & "'", , acHidden
DoCmd.OpenReport "receiptreprint", acViewNormal, , "[CardNumber2] = '" & UPDATESCOREPRINT & "'", , acHidden
Debug.Print UPDATESCOREPRINT
DoCmd.Close
DoCmd.OpenForm "EntryForm", acNormal, , , acFormAdd, acWindowNormal

End Sub
 

Users who are viewing this thread

Back
Top Bottom