hey thx for the sample which u have provided, but i was just thinking isn't there a way to keep the codes i have as they are and add a VBA code " On Change event " within TxtItem Field?
i have this code below which will update " letter by letter as i type " one column, in this case "company" , based on what i type in a field named "CboFilter" but the source of the form have to be the query which is being filtered, in order for it to work, but i want this to be operational in the data entry conjunction table form, and to look up another sub form from another table, so i have to reference the sub form to filter within the code below, but i dono how to add it =l
Code:
Private Sub CboFilter_Change()
If Nz(Me.CboFilter.Text) = "" Then
Me.Form.Filter = ""
Me.FilterOn = False
ElseIf Me.CboFilter.ListIndex <> -1 Then
Me.Form.Filter = "[Company] = '" & _
Replace(Me.CboFilter.Text, "'", "'") & "'"
Me.FilterOn = True
Else
Me.Form.Filter = "[Company] Like '*" & _
Replace(Me.CboFilter.Text, "'", "'") & "*'"
Me.FilterOn = True
End If
Me.CboFilter.SetFocus
Me.CboFilter.SelStart = Len(Me.CboFilter.Text)
End Sub