S
SAC
I'm trying to lookup a record on a form with two combo boxes. It does this,
but also adds a record.
The afterupdate event on the second combo box triggers this code:
Dim rst As Recordset
Dim strSearchName As String
Dim strSearch As String
Set rst = Me.RecordsetClone
strSearchName = Me!cboEmpLU 'First cb
strSearch = Me!cboJobLU '2nd cb
rst.FindFirst "Empkey = " & strSearchName & " AND JobKey = " & strSearch
If Not rst.NoMatch Then Me.Bookmark = rst.Bookmark
rst.Close
Any ideas on how to make it not add a record when it finds one?
Thanks.
but also adds a record.
The afterupdate event on the second combo box triggers this code:
Dim rst As Recordset
Dim strSearchName As String
Dim strSearch As String
Set rst = Me.RecordsetClone
strSearchName = Me!cboEmpLU 'First cb
strSearch = Me!cboJobLU '2nd cb
rst.FindFirst "Empkey = " & strSearchName & " AND JobKey = " & strSearch
If Not rst.NoMatch Then Me.Bookmark = rst.Bookmark
rst.Close
Any ideas on how to make it not add a record when it finds one?
Thanks.