First it's good to see that you are already using parameters but with MS Access, the order of the parameters is important not the names. I use the ? placeholder within my SQL command when using parameters. I also specify the data type so consider using the OleDbParameter Constructor (String, OleDbType) to add your parameters.
I would also consider implementing Using:
Managed resources are disposed of by the .NET Framework garbage collector (GC) without any extra coding on your part. You do not need a Using block for managed resources. However, you can still use a Using block to force the disposal of a managed resource instead of waiting for the garbage collector.
You could implement a check for the value returned by ExecuteNonQuery() to see how many rows were effected.
Lastly, with VB.NET by not specifying a modifier here; Private Sub AssignParams(cmd As OleDbCommand), the compiler by default will use ByVal:
Specifies that an argument is passed in such a way that the called procedure or property cannot change the value of a variable underlying the argument in the calling code.
You should be using ByRef:
Specifies that an argument is passed in such a way that the called procedure can change the value of a variable underlying the argument in the calling code.
Your code would look something like this:
Public Function update() As Boolean
Dim STATE As Boolean = False
Using con As OleDbConnection = cn,
cmd As New OleDbCommand("UPDATE [GUEST_DATA_TBL] SET [USD]=?, [RIEL]=?, [EURO]=?, [BAHT]=?, [AUSD]=?, [GIFT]=?, [MEMO]=? WHERE [ID]=?", con)
con.Open()
AssignParams(cmd)
Dim rowsAffected As Integer = cmd.ExecuteNonQuery()
If rowsAffected > 0 Then
STATE = True
End If
End Using
Return STATE
End Function
Private Sub AssignParams(ByRef cmd As OleDbCommand)
cmd.Parameters.Add("@USD", OleDbType.[Type]).Value = USD
cmd.Parameters.Add("@RIEL", OleDbType.[Type]).Value = RIEL
cmd.Parameters.Add("@EURO", OleDbType.[Type]).Value = EURO
cmd.Parameters.Add("@BAHT", OleDbType.[Type]).Value = BAHT
cmd.Parameters.Add("@AUSD", OleDbType.[Type]).Value = AUSD
cmd.Parameters.Add("@GIFT", OleDbType.[Type]).Value = GIFT
cmd.Parameters.Add("@MEMO", OleDbType.[Type]).Value = MEMO
cmd.Parameters.Add("@ID", OleDbType.[Type]).Value = ID
End Sub
Note that I have used OleDbType.[Type]. You will want to replace [Type] with the data type you've used on your database.
IDshould be last.BAHTandEUROneed to be switched in yourAssignParamsmethod.