Since Tag is unique in the table, could designate it as primary key and eliminate the ID autonumber.
There is no need for the CurrentDate field. Populate TimeIn and TimeOut with full date/time. Set TimeIn with DefaultValue of Now() or use code to populate field.
Elapsed time can be calculated when needed. This data does not need to be saved to table. Use expression in textbox or in query: DateDiff("n",[Time In],[Time Out])
Divide by 60 if you want decimal hours instead of minutes.
Also, elapsed time would not be Date/Time type field anyway.
Put an unbound combobox named cbxTag in the form header, RowSource: SELECT Tag FROM CTP;
or a textbox named tbxEnterTag.
Code for combobox (if you prefer textbox, just change the name referenced):
Code:
Option Compare Database
Option Explicit
Private Sub cbxTag_AfterUpdate()
With Me.RecordsetClone
.FindFirst "Tag=" & Me.cbxTag
If .NoMatch Then
DoCmd.GoToRecord acActiveDataObject, , acNewRec
Me!TAG = Me.cbxTag
Else
Me.Bookmark = .Bookmark
Me.Time_Out = Now()
End If
End With
DoCmd.RunCommand acCmdSaveRecord
End Sub
Set all the textboxes in Detail section as Locked Yes, TabStop No.
What is AmountOwn field for? It is not on the form.
Advise no spaces in field names.