A
Arvin Villodres
I tried to make event logs of my own and i tried doing
this. I embeded a SQL in VBA of the AfterUpdate event in a
text box.
Dim cmd As ADODB.Command
Dim rst As ADODB.Recordset
Set cmd = New ADODB.Command
With cmd
.ActiveConnection = CurrentProject.Connection
.CommandText = "INSERT INTO tblEventLog ( [Date],
Event, USERID, TERMID, [Time] ) SELECT Date() AS
[Date], 'ADDED CODE' AS Event, [Forms]![Switchboard]!
[txtSBUID] AS [USER], [Forms]![Switchboard]![txtSBTID] AS
TERMINAL, Time() AS [Time];"
.CommandType = adCmdText
.Prepared = True
Set rst = .Execute
End With
An error occurs after I run this event.
Run-time error '-2147217904(80040e10)':
No Value given for one or more required parameters
I think something wrong with 'ADDED CODE' AS Event part.
I don't know how to correct this error.
Will you be kind enough to help me.
Thanks
this. I embeded a SQL in VBA of the AfterUpdate event in a
text box.
Dim cmd As ADODB.Command
Dim rst As ADODB.Recordset
Set cmd = New ADODB.Command
With cmd
.ActiveConnection = CurrentProject.Connection
.CommandText = "INSERT INTO tblEventLog ( [Date],
Event, USERID, TERMID, [Time] ) SELECT Date() AS
[Date], 'ADDED CODE' AS Event, [Forms]![Switchboard]!
[txtSBUID] AS [USER], [Forms]![Switchboard]![txtSBTID] AS
TERMINAL, Time() AS [Time];"
.CommandType = adCmdText
.Prepared = True
Set rst = .Execute
End With
An error occurs after I run this event.
Run-time error '-2147217904(80040e10)':
No Value given for one or more required parameters
I think something wrong with 'ADDED CODE' AS Event part.
I don't know how to correct this error.
Will you be kind enough to help me.
Thanks