-
Well here is the Deal. I am working on the following query
SELECT creditanddebit.date, creditanddebit.debit, creditanddebit.credit, creditanddebit.accountbalance FROM creditanddebit, internalaccounts WHERE creditanddebit.account= internalaccounts.accountnumber AND internalaccounts.accountdesc='Cash in Transit'
Well everything workd fine .. But I want to query it on a variable insted of the Actual field name .. 'Cash in Transit'
If i replace 'Cash in Transit' with a variable name with the same string stored in it .. It doesnt do anything
any suggestions why ?
-
Make sure the tick marks are around the variable
"internalaccounts.accountdesc= " & 'vCashOnHand'
-
You have to write a variable or control (txtText.text) like this :
'" & intAccount & "'
in case it's hard to read, that's (apostrophe,quote,space,ampersand, space, variable,space,ampersand,space,quote,apostrophe)