I have a report in Access 2007 that returns records based on a product code. Simple enough, right?
However, I have a form where folks can click "Product Code" and enter the code, let's say 1234, and instead of rptCode coming up with all four entries with that product code, it only returns one.
That said, if I run the report directly, with the same product code, I get all four entries!
I'm guessing, then, that it's the coding or something I've messed up that cuts it off at one. I have no idea what, though.
Any idea what might be causing that?
Here is the code I'm using "on click" for the button:
Option Compare Database
Private Sub Label9_Click()
On Error GoTo Err_Label9_Click
Dim stDocName As String
stDocName = "rptCode"
DoCmd.OpenReport stDocName, acPreview
Exit_Label9_Click:
Exit Sub
Err_Label9_Click:
MsgBox Err.Description
Resume Exit_Label9_Click
End Sub