Add in Combo Box or Lookup Values

kellan4459

Registered User.
Local time
Today, 22:55
Joined
Nov 26, 2001
Messages
31
I have asked before but I didn't get the solution. What I am looking at is a Table Named EmployeeData. This table contains the fields {SSN, LastName, FirstName, MiddleInitial, OriginalHireDate, OriginalPayRate, Discipline, Level}
I want the combo box to check if SSN(combo box field) has been entered before, if not then ask vbOKCancel To add new record with that SSN, on ok add new record with that SSN, else if it has been entered I want it to look up the record associated with that SSN. Any help would greatly be appreciated deadline is coming up.
 
If SSN is indexed then surely it wont allow duplicates. Please continue existing threads so members can see any solutions previously given.
 
The SSN is indexed so it won't give duplicate entries. I am unable to add new records because it keeps saving the Combo Box Value at 0? When I place in the code that I was given by others to look up values, which was the Find method with the bookmark method the code will not work. If you could give me some insite to why I am getting an error that says no current record? Here is the code I have that isn't working!

Private Sub Combo44_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[SSN] = " & Str(Me![Combo44])
Me.Bookmark = rs.Bookmark
End Sub

[This message has been edited by kellan4459 (edited 11-30-2001).]

[This message has been edited by kellan4459 (edited 11-30-2001).]
 

Users who are viewing this thread

Back
Top Bottom