I am new to VBA but familiar with access. I am creating a form that contains a searching list box. I have a text box and a list box and my desire is to have the list box scroll to match whatever is typed so far in the textbox. These are the properties and code behind each of the controls:

Name txtDepartments
Property__OnExit ______________[Event Procedure]
On Change_____________[Event Procedure]

Name lstDepartments
AfterUpdate___________[Event Procedure]
Row Source____________Location
ColumnCount __________1

Code for ListBox lstDepartments

Private Sub lstDepartments_AfterUpdate()
acdUpdateSearch Me!txtDepartments, Me!lstDepartments
End Sub

Code for TextBox txtDepartments:

Private Sub txtDepartments_Change()
Dim varRetval as Variant

End Sub

Private Sub txtDepartments_Exit(Cancel as Integer)
acbUpdateSearch Me!txtDepartments, Me!lstDepartments
End Sub

I have the code for the acbDoSearchTable function but I DONT have the code for the **acbUpdateSearch** function.Please help me with the code 4 this function. Thank u in advance.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!