The setting of quotes seems completely wrong to me.
Assuming fees is numeric and you want to subtract the value in AdjyustAmount.Text then I'd say it should look like:
It is possible guys that Fees is not a variable within the program but rather the intent may be to reduce the current value of Fees in the database by the value of the text in the text box. In which case the select would need to be a bit different than any posted thus far.
The op needs to provide info as to what he is actually trying to do.
Oh. Seems I forgot a quote in my first answer.
Ok, if DataMisers assumption is right and we want to reduce a field named FEES by a value then it must be:
Oh... I forgot to delete the first & and following quote.
Yes, firoz, it obviously is. But NOT in the place you are indicating.
My final vote is
Code:
SQL = "update TBL_TEST_LIB set FEES=FEES - " & AdjustAmount.Text
FEES is a field name of the table. It is not known stand-alone outside the SQL string.
The only thing outside the string which must be catenated with the & is the numeric value in the text field. Even the Minus sign must be within the string.
The only thing outside the string which must be catenated with the & is the numeric value in the text field. Even the Minus sign must be within the string.
oh yes, wof is really genious .i even did not notice . fees is a fieldName in a table TBL_TEST_LIB .
Bookmarks