justme1310
Technical User
Hi Everyone,
Can someone please help me with this problem.
I'm trying to keep track of changes made to a certain field by saving relevant details as a record in the table tblchanges.
tblchanges has the following fields:-
ID : Autonumber
Fileno : Text
Fieldname : Text
Oldvalue : Text
NewValue : Text
Datechg : Date/Time
I verified that all the values are being passed to the SQL statement, yet the table is not being updated.
What am I doing wrong?? SEE CODE BELOW
Thanks in advance.
Will
Can someone please help me with this problem.
I'm trying to keep track of changes made to a certain field by saving relevant details as a record in the table tblchanges.
tblchanges has the following fields:-
ID : Autonumber
Fileno : Text
Fieldname : Text
Oldvalue : Text
NewValue : Text
Datechg : Date/Time
I verified that all the values are being passed to the SQL statement, yet the table is not being updated.
What am I doing wrong?? SEE CODE BELOW
Thanks in advance.
Will
Code:
Private Sub Combo36_Change()
Dim flno As String
Dim fldnme As String
Dim oldval As String
Dim newval As String
Dim tdate As Date
flno = PFILENO
fldnme = "ONCOLOGIST"
oldval = Text29
newval = Combo36
tdate = Date
strSql = "INSERT INTO tblchanges " _
& "( fileno,fieldname, oldvalue, newvalue, datechg ) " _
& "VALUES ( " & flno & ", " & fldnme & ", " & oldval & ", " & newval & ", " & tdate & " )"
DoCmd.RunSQL strSql
End Sub