I have a report which has control source from myTable. Then I have a form with 1 textbox for users to enter the jCode they want to search for. (jCode in my table is not a primary key. My primary key is an auto number)
On the form I have button cmdSearch.
Private Sub cmdSearch_Click()
DoCmd.OpenReport "report1", acViewNormal, , "[txtJCode] = " & Me.txtJCodeSearch
End Sub
Everytime I click button cmdSearch, I got a parameter window asking for txtJcode. This is not supposed to happen. What did I do wrong ? I even enter the jCode again in the parameter window but nothing happens after that. It doesn't open my report at all.
Thanks
On the form I have button cmdSearch.
Private Sub cmdSearch_Click()
DoCmd.OpenReport "report1", acViewNormal, , "[txtJCode] = " & Me.txtJCodeSearch
End Sub
Everytime I click button cmdSearch, I got a parameter window asking for txtJcode. This is not supposed to happen. What did I do wrong ? I even enter the jCode again in the parameter window but nothing happens after that. It doesn't open my report at all.
Thanks