|
-
Jul 30th, 2001, 08:45 AM
#1
Thread Starter
Lively Member
What's wrong with the rebind
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
-
Jul 30th, 2001, 09:48 AM
#2
Thread Starter
Lively Member
I figured it out.
I had to write Adodc1.refresh after I changed the adodc1.recordsource. Now the Datagrid was rebinding fine.
Reggie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|