I need to create a query dynamically
cbo1 ...Combo Box has row source= "Field List" from "table1"
txt1...Text box where the user will type
The user selects 'Field Name" in the combo and types a value in the text box
The query will keep changing based on selection of the field in the combo box
Select * from table1 where (field name selected in cbo1) LIKE [txt1]
when I try
Select * from table1 where forms!Form1![cbo1] LIKE [txt1] and type a value existing in the table...the query returns no records.
Looks like it is unable to understand that the value selected in the combo is a Field Name.
Eg: Field names in the table are Products,Country,date
then the possible queries should be based on cbo1 selection
Select * from table1 where [Products] LIKE [txt1]
Select * from table1 where [Country] LIKE [txt1]
and I want to set this as the Recordsource of a Subform
How do i do it?
cbo1 ...Combo Box has row source= "Field List" from "table1"
txt1...Text box where the user will type
The user selects 'Field Name" in the combo and types a value in the text box
The query will keep changing based on selection of the field in the combo box
Select * from table1 where (field name selected in cbo1) LIKE [txt1]
when I try
Select * from table1 where forms!Form1![cbo1] LIKE [txt1] and type a value existing in the table...the query returns no records.
Looks like it is unable to understand that the value selected in the combo is a Field Name.
Eg: Field names in the table are Products,Country,date
then the possible queries should be based on cbo1 selection
Select * from table1 where [Products] LIKE [txt1]
Select * from table1 where [Country] LIKE [txt1]
and I want to set this as the Recordsource of a Subform
How do i do it?