I am trying to update a record through a form based on an unbound text box and a null value but I'm having a little trouble getting the code to work. I'm hoping that someone here can help me.
Basically I'm looking to add a timestamp to a specific field (TimeOut) if the record contains the value in the text box AND a null value in the TimeOut field.
So my variables here are:
Table where all of this is found = Test
Field that needs to match the text box = MoldNumber
Text Box = txtMold
Field that I need updated if it has a null value = TimeOut.
Here's the code I'm trying but failing with:
CurrentDb.Execute "UPDATE Test SET TimeOut = #" & Now() & "# WHERE MoldNumber= '" & Me!TxtMold & "'", IsNull(TimeOut), dbFailOnError
I'm not terribly well versed in VBA but I just can't seem to figure this out. Any help would be greatly appreciated!