The Error Disallowed implicit conversion from data type varchar to data type money usually occurs when try to assign String Value to Money Data Type of Sql Server.
1. Assign String(Varchar) Value to Sql Server Column value which is of Money data type.
2. Especially in Insert and Update Queries
Assume Account Table in Sql Server contains a Field Amount which is of Type "Money".
strSQL = "Insert INTO AccountTable(Amount) Values (" & txtamount.text & ")"
strSQL = "UPDATE AccountTable SET Amount = " & txtamount.text
Need to Convert the Value of Varchar Type or String Type to Money.
How to convert Varchar to Money Type?
Need to Use CONVERT Function and Single Quotes.
strSQL = "Insert INTO AccountTable(Amount) Values (CONVERT(money,'" & txtamount.text & "'))"
strSQL = "UPDATE AccountTable SET Amount = (CONVERT(money,'" & txtamount.text & "'))"
(Note the single-quote just after the word money, and the single-quote and end paren just prior to the final comma.)