Howdy, Stranger!

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

Categories

acdUpdateSearch

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:
*********************************************************************

1.TextBox
Name txtDepartments
Property__OnExit ______________[Event Procedure]
On Change_____________[Event Procedure]

2.ListBox
Name lstDepartments
AfterUpdate___________[Event Procedure]
Row Source____________Location
ColumnCount __________1
BoundColumn___________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

varRetval=acbDoSearchTable(Me!txtDepartments,Me!lstDepartments,"Departments","Departments")
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.