title: Update Fields in Record Using Forms Command Button
body: <p>I'm new to MsAccess.
  I have a table named "Tracking" which contains some fields including "OrderID", "Process1_In" and "Process1_Out".</p>
  
  <p>I created a form which creates records with "OrderID" and "Process1_In".
  I'm creating another form where users input an "OrderID" into a textbox named "OrderID" and click the command button where this updates the "Process1_Out" field in the Tracking table with the current date and time (using the Now() function).</p>
  
  <p>I created the codes in the Form_BeforeUpdate event as follow:</p>
  
  <pre><code> Private Sub Form_BeforeUpdate(Cancel As Integer)
  
   Update Tracking 
  
        Set Process1_Out = Now()
  
        Where OrderID = OrderID.Value
  
   End Sub
  </code></pre>
  
  <p>However this doesn't update the record as planned. Anyone can help?</p>