Hi, in MS Access I want to create a SQL query where field name can be taken from a text box or combobox. For example, I have a table name "bank" and it has fields "Customer_id"," Cust_name","tra nsaction". I want to display all transactions of customer "John". So I have two text boxes to provide the field name and the customer name. I want to make an SQL query to display the results but I don't want to provide the field/column name directly to the SQL command instead using text box. Can anyone help me please?
I don't want to write : SELECT Cust_name, transaction from bank where Cust_name = "John"
I want like : SELECT (text1.value),t ransaction from bank where (text1.value) = (text2.value)
I don't want to write : SELECT Cust_name, transaction from bank where Cust_name = "John"
I want like : SELECT (text1.value),t ransaction from bank where (text1.value) = (text2.value)
Comment