It is helpfull to think about what your statements will evaluate to.
If prmTest = 45 and prmTest2 = "Dilly", then your first statement evaluates to
Code:
select * from chgtracker where chgdate = 45
Your second statement evaluates to
Code:
select * from chgtracker where approveby = Dilly
In that case, Dilly would be initially thought to be a field/column, and if that could not be resolved it would be evaluated as a variable, since Dilly is not really a value.
dhay1999 is mistaken regarding the first statement. A string of digits is regarded as a literal value. Enclosing that in quotes would result in failure to fly.
But he is right regarding the second statement. When the value on one side of an equality operator is a literal string, it needs to have a single quote on each side of the characters. Your statement should be
Code:
Adodc1.RecordSource="select * from chgtracker where approveby = '" & prmTest2 & "'"
or the contents of prmTest2 should be like 'Dilly'