Let's say you have:
Dim strSQL as String
Dim MyVar as String
strSQL = "DELETE tblChosenOnes.ChosenOnes FROM tblChosenOnes WHERE (((tblChosenOnes.ChosenOnes)='fred'));"
I know that the above SQL actually works, BUT I do not want 'Fred' to be static. I want the user to be able to change 'Fred' thru a list box.
SO:
How do you replace 'fred' with a variable (MyVar)so that you won't get an SQL error? - or can you even do this at all? i.e. what's the syntax?
thanks.
<b>s.c.</b>
Dim strSQL as String
Dim MyVar as String
strSQL = "DELETE tblChosenOnes.ChosenOnes FROM tblChosenOnes WHERE (((tblChosenOnes.ChosenOnes)='fred'));"
I know that the above SQL actually works, BUT I do not want 'Fred' to be static. I want the user to be able to change 'Fred' thru a list box.
SO:
How do you replace 'fred' with a variable (MyVar)so that you won't get an SQL error? - or can you even do this at all? i.e. what's the syntax?
thanks.
<b>s.c.</b>