|
-
Feb 27th, 2001, 04:01 PM
#1
Thread Starter
Hyperactive Member
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 ?
-
Feb 27th, 2001, 04:24 PM
#2
Addicted Member
Make sure the tick marks are around the variable
"internalaccounts.accountdesc= " & 'vCashOnHand'
-
Feb 27th, 2001, 04:48 PM
#3
Hyperactive Member
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)
A cynic knows the price of everything but the value of nothing.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|