A family of Microsoft relational database management systems designed for ease of use.
Did you insert a value into the txtCust control before clicking the button. As I said before, all indications are that the control is Null.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi, I have created a form in access 2010 called "customer profile" on the form I have 2 reports that I created and dragged onto the form "Credits" and "Denials"
On my 'customer profile' form I have a search button where when we enter the customer number of a client the information regarding that specific client populates on the (subreports) on the form 'Credits and Denials'.
When we go to print the reports for the specific customer the criteria changes and ALL customers start to print rather than the specific customer we searched for.
How can we fix this, please help
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Did you insert a value into the txtCust control before clicking the button. As I said before, all indications are that the control is Null.
And you typed in an custom umber before hitting the button?
This doesn't make sense. this is very standard code.
Can you show us the SQL statement that feeds the Credits report?
If possible could you upload to cloud storage a sample of your file?
Ok So I tried again and it is opening the report, however the report is showing all customers and not the specific customer I inputted in the search
Ok so I did exactly what you suggested and when I ran the command I got the same message. I changed the QNCLI to CustNo to see, and same error message saying syntax error (missing operator) "[QNCLI] ="
Alright lets start this from scratch. Create a new unbound form and put a text box and a button on it. Name the textbox txtCust and button cmdCredits.
Behind the button put
DoCmd.OpenReport "Credits",acViewPreview,,"[QNCLI] = " & Me.txtCust
See if that works.