I am using the code below to update the amount available reactions:
the data type of the reactions on the table is set to Number and the query:
I am getting a data type mismatch error 3464 and not sure why. Thanks.
Code:
Private Sub cmdConfirm_Click()
On Error GoTo cmdConfirmErr
DoCmd.RunCommand acCmdSaveRecord 'save record
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryUpdateReactions" 'update Reactions
DoCmd.GoToRecord acDataForm, Me.Name, acNewRec 'set form to new record OR use DoCmd.Close acForm, Me.Name to close the form
cmdConfirmExit:
DoCmd.SetWarnings True
Exit Sub
cmdConfirmErr:
MsgBox Err.Number & vbLf & Err.Description
GoTo cmdConfirmExit
End Sub
the data type of the reactions on the table is set to Number and the query:
Code:
(DLookUp("Reactions","tblLibrary")-Val([forms]![Patients]![Text119]))
I am getting a data type mismatch error 3464 and not sure why. Thanks.