In Microsoft Access I made a form with a textbox and a query. Whatever is written in the textbox will be shown in the query (for example you type customer1 and the query displays all rows that have firstname(this is a column name) customer 1).
Now I'm trying to make it so that if you double click (or click) one of those rows(customers) it opens a form that only shows that specific row/customer instead of all customers with name customer1(for example).
Also this is my query code :
SELECT *
FROM Customers
WHERE Forms.[Form1].[Text4] IS NULL OR (Forms.[Form1].[Text4] = Forms.[Form1].[Text4] AND FirstName=Forms.[Form1].[Text4]);
Thank you for any help.
SELECT * FROM Customers WHERE FirstName = Forms!Form1.Text4
. What is your code to open the form? I never use dynamic parameterized query. I prefer VBA to set form or report filter:DoCmd.OpenForm "formname", , , "FirstName='" & Me.Text4 & "'"
– June7