updatable and changable row source

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In my form that contain one text box (unbound) at the top and one list box in
down, when I start the typing in the text box the row source of list box that
is the query that depend on the text box (parameter) automatically updated
and show the records in the list box.

Best regards.
 
Masoud said:
In my form that contain one text box (unbound) at the top and one list box in
down, when I start the typing in the text box the row source of list box that
is the query that depend on the text box (parameter) automatically updated
and show the records in the list box.


That's awfully vague, but the general idea would be to use
the text box's Change event to reconstruct the row source
SQL statement using the text box's Text property. Then
stuff the SQL string into the list box's RowSource property.
 
Marshall Barton said:
That's awfully vague, but the general idea would be to use
the text box's Change event to reconstruct the row source
SQL statement using the text box's Text property. Then
stuff the SQL string into the list box's RowSource property.
I like to do this event wih keyup_ event or change_event but I don't know how?
if you know please send to me.(my previouse question was not complete)
 
Masoud said:
I like to do this event wih keyup_ event or change_event but I don't know how?
if you know please send to me.(my previouse question was not complete)


You really should provide sufficient details to help me
understand exactly what you are trying to accomplish. All I
can do at this point is provide a general air code example
of the text box's Change event procedure:

Dim strSQL As String

strSQL = "SELECT fieldlist FROM sometable " & _
"WHERE somefield Like ""*" & Me.thetextbox.Text & "*"""
Me.thelistbox.RowSource = strSQL
 
Back
Top