Hi all, is it possible to use variable instead of field name after where in select sql ??
pSQL = "select * from tbl_Data WHERE Type1 = '" & Me.Text0.Value & "' "
in the code i want to use variable instead of Type1 and I wrote it but it didn't work :
var = me.text2
pSQL = "select * from tbl_Data WHERE " & var & " = '" & Me.Text0.Value & "' "
pSQL = "select * from tbl_Data WHERE Type1 = '" & Me.Text0.Value & "' "
in the code i want to use variable instead of Type1 and I wrote it but it didn't work :
var = me.text2
pSQL = "select * from tbl_Data WHERE " & var & " = '" & Me.Text0.Value & "' "