Hi All,
I have an audit form which has a calculating unbound text box which displays a result at the end of the audit. I understand it's not best practice to save these in the table however I need to secure what the result was at the time of the audit.
I have managed to compile the code to place within the event used when I click the save button. The command button does a number of functions so this is just one of them. It saves in the table just fine except it always saves as a new entry. I want it to save in the field of the current entry. Is there any way to do this?
I have an audit form which has a calculating unbound text box which displays a result at the end of the audit. I understand it's not best practice to save these in the table however I need to secure what the result was at the time of the audit.
I have managed to compile the code to place within the event used when I click the save button. The command button does a number of functions so this is just one of them. It saves in the table just fine except it always saves as a new entry. I want it to save in the field of the current entry. Is there any way to do this?
Code:
Dim sql As String
Dim QAResult As String
Dim db as DAO.Database
set db = CurrentDb
QAResult = Me.txtQAResult.Value
If Not IsNull(QAResult) Then
sql = "INSERT INTO tblQAAuditRecords2014 ([QAResult]) VALUES ('" & QAResult & "')"
CurrentDb.Execute (sql)
End If
Comment