I have a datagrid, an ADO control, a text box and a command button on a form.
At run time. I pick either 1, 2 or 3 and the datagrid populates fine. I then put a value which is different from what I picked the first time, the datagrid doesn't rebind??? . What else should I be doing to change the value in the datagrid.

This is what I wrote under the command button:

Private Sub Command1_Click()
If Text1 = 1 Then
Adodc1.RecordSource = "TITLES"
Set DataGrid1.DataSource = Adodc1
DataGrid1.ReBind
ElseIf Text1 = 2 Then
Adodc1.RecordSource = "AUTHORS"
Set DataGrid1.DataSource = Adodc1
DataGrid1.ReBind
ElseIf Text1 = 3 Then
Adodc1.RecordSource = "[Title Author]"
Set DataGrid1.DataSource = Adodc1
DataGrid1.ReBind
End If

End Sub