LOUISBUHAGIAR54
Registered User.
- Local time
- Yesterday, 20:42
- Joined
- Mar 14, 2010
- Messages
- 157
Hi All Access programmers,
I have been trying to solve this problem with no success after a search on online sites.
I have an SQL statement with two variables, that does not seem to get going. I know that one variable is punctuated well and is working but the other seems to stick for some reason. Here is the statement;
strSQL = " UPDATE TblProducts SET TblProducts.Costprice = ' & danilprezz WHERE (((TblProducts.CPSUStockCode)= '" & codici & "'));"
danilprezz is a number variable introduced as Dim danilprezz as Currency, while codici is a string variable and functions well since the following statement works as expected;
strSQL = " UPDATE TblProducts SET TblProducts.Costprice = 7.13 WHERE (((TblProducts.CPSUStockCode)= '" & codici & "'));"
There must be something wrong with the punctuation of danilprezz.
Can anyone give me a hint to solve this problem please ?
I have been trying to solve this problem with no success after a search on online sites.
I have an SQL statement with two variables, that does not seem to get going. I know that one variable is punctuated well and is working but the other seems to stick for some reason. Here is the statement;
strSQL = " UPDATE TblProducts SET TblProducts.Costprice = ' & danilprezz WHERE (((TblProducts.CPSUStockCode)= '" & codici & "'));"
danilprezz is a number variable introduced as Dim danilprezz as Currency, while codici is a string variable and functions well since the following statement works as expected;
strSQL = " UPDATE TblProducts SET TblProducts.Costprice = 7.13 WHERE (((TblProducts.CPSUStockCode)= '" & codici & "'));"
There must be something wrong with the punctuation of danilprezz.
Can anyone give me a hint to solve this problem please ?