Hi everyone,
Been a bit stuck on this for a couple days so thought I'd ask on here. I've added a button to my form for a start time for the form being filled out, and have another for the end time so my users/managers can produce a report about how long their engineering process is taking. I have found how to add the time to a textbox so I want to just use this code for my command button and then use the textbox it inputs it into to save to my table. The code I found is:
However, when I put this code behind my command button and then open the form and click the command button, nothing happens. I'm really unsure as to why this is and have scoured the forum and other pages on the internet to find an answer but I cannot seem to find one.
I'm sure it's something really stupid and easy to fix, but any help would be appreciated!
Been a bit stuck on this for a couple days so thought I'd ask on here. I've added a button to my form for a start time for the form being filled out, and have another for the end time so my users/managers can produce a report about how long their engineering process is taking. I have found how to add the time to a textbox so I want to just use this code for my command button and then use the textbox it inputs it into to save to my table. The code I found is:
Code:
Dim strSQL As String
Me.txtStartTime = Now()
strSQL = "UPDATE tblEQNResponse SET StartTime = #" & Me.txtStartTime & "#;"
CurrentDB.Execute strSQL, dbFailOnError
However, when I put this code behind my command button and then open the form and click the command button, nothing happens. I'm really unsure as to why this is and have scoured the forum and other pages on the internet to find an answer but I cannot seem to find one.
I'm sure it's something really stupid and easy to fix, but any help would be appreciated!