Thanks for your answers, and I agree, the application is for make life easier.
What I am trying to do is to put a Find tool in the form, then the user only has to type the first letter in the combo box and then click the arrow to find a particular name.
Now I need more help on the syntax, please!!!!
I have this from the Applecore99
Private Sub Form_Current()
Dim strSQL As String
If Not IsNull(Me!PATIENT_ID) Then
strSQL = "SELECT tblIBSPatients.PATIENT_ID, [P_LNAME] & , & [P_FNAME] AS Patient" _
& " FROM tblIBSPatients" _
& " WHERE Patient_ID =" & Me!PATIENT_ID
Me!Combo31.RowSource = strSQL
Else
Me!Combo31.RowSource = ""
End If
Combo31 = PATIENT_ID
End Sub
Private Sub Combo31_AfterUpdate()
Dim strSQL As String
If Len(Me!Combo31.Text & "") >= 4 Then
strSQL = "SELECT tblIBSPatients.PATIENT_ID, [P_LNAME] & , & [P_FNAME] AS Patient" _
& "FROM tblIBSPatients" _
& "WHERE tblIBSPatients.PATIENT_ID <> '-' AND tblIBSPatients.PATIENT_ID LIKE '" & Combo31.Text & "*'" _
& "ORDER BY [P_LNAME] & , & [P_FNAME];"
Me!Combo31.RowSource = strSQL
Else
Me.Combo31.RowSource = ""
End If
But there are something wrong in the syntax. Thanks a lot again.