P
Paulo Gonçalves
Hello,
I'm trying using sql to insert into a field a value in a
table, in this table i have 4 fields:
[Log_id],[User_Id],[Data_in] and [Data_out], when i enter
the db i fill fields [User_id] and [Data_in] and the
problem comes when i want to close db and set[Data_out] to
the last user.
I'm using this code in a module:
Function Sair()
On Error GoTo Sair_Err
Dim strSQL As String
'Faz o registo de Saida do utilizador
strSQL = "Update [tblLog] set [Data_out]='" & Now()
& "'" _
& " WHERE [tblLog].[Data_out]= '" & Null &"'"
DoCmd.RunSQL strSQL
DoCmd.Quit
Sair_Exit:
Exit Function
Sair_Err:
MsgBox Error$
Resume Sair_Exit
End Function
Can someone give me a help please!
I'm trying using sql to insert into a field a value in a
table, in this table i have 4 fields:
[Log_id],[User_Id],[Data_in] and [Data_out], when i enter
the db i fill fields [User_id] and [Data_in] and the
problem comes when i want to close db and set[Data_out] to
the last user.
I'm using this code in a module:
Function Sair()
On Error GoTo Sair_Err
Dim strSQL As String
'Faz o registo de Saida do utilizador
strSQL = "Update [tblLog] set [Data_out]='" & Now()
& "'" _
& " WHERE [tblLog].[Data_out]= '" & Null &"'"
DoCmd.RunSQL strSQL
DoCmd.Quit
Sair_Exit:
Exit Function
Sair_Err:
MsgBox Error$
Resume Sair_Exit
End Function
Can someone give me a help please!