I have Been Stuck with being unable to update Access Database Table.
This is what I am trying to achieve:
1- Search Access Database table (Table3) where Field(ID) = cell value/text
2-Update Table Field(Time_out) with Now()
close access
this is what i have been able to compile but something is wrong
This is what I am trying to achieve:
1- Search Access Database table (Table3) where Field(ID) = cell value/text
2-Update Table Field(Time_out) with Now()
close access
this is what i have been able to compile but something is wrong
Code:
Sub update2()Dim accApp As Object
Dim strOrder As String, strCode As String
strOrder = "4424"
strCode = Now()
Dim SQL As String
SQL = "UPDATE [Table3] SET [Table3].Time_out = " & strCode & " WHERE "
SQL = SQL & "((([Table3].ID)=4424));"
Set accApp = CreateObject("Access.Application")
With accApp
.OpenCurrentDatabase "C:\Signin-Database\DATABASE\Visitor_Info.accdb"
.DoCmd.RunSQL
.Quit
End With
Set accApp = Nothing
End Sub