G
Guest
This has got to be the easiest thing to do in a database, but I just cannot
figure it out. I have a multi user database. It has "startclock" and
"stopclock" fields in a table. The form Control Source is the table. What I
want to do is retrieve the record for a specific employye where the
"startclock" field has an entry and the "stopclock" field is empty. I've
tried using a combo box to simply retrieve "any" record for the employee and
keep getting a "not a current record" error. The table columns are:
OPID
FirstName
LastName
I have the control source column set at 1 because if I set it to 0
Me![Test] is one digit less than the what it should be (OPID) - and still get
the same error.
The code is below. "Test" is the combobox name and it is unbound.
"ClockOut" is one of several option buttons.
Private Sub ClockOut_GotFocus()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.findfirst "[OPID]='" & Me![Test] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Can anyone tell me what I am missing?
figure it out. I have a multi user database. It has "startclock" and
"stopclock" fields in a table. The form Control Source is the table. What I
want to do is retrieve the record for a specific employye where the
"startclock" field has an entry and the "stopclock" field is empty. I've
tried using a combo box to simply retrieve "any" record for the employee and
keep getting a "not a current record" error. The table columns are:
OPID
FirstName
LastName
I have the control source column set at 1 because if I set it to 0
Me![Test] is one digit less than the what it should be (OPID) - and still get
the same error.
The code is below. "Test" is the combobox name and it is unbound.
"ClockOut" is one of several option buttons.
Private Sub ClockOut_GotFocus()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.findfirst "[OPID]='" & Me![Test] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Can anyone tell me what I am missing?