paul
Aug 29th, 1999, 05:12 AM
Hi
I am trying to use a MSFlexGrid to display data from a MSAccess database.
Here is my code. I cant get the grid to show the results.I am very NEW to VB
and any help would be appreciated.
Thanks
Private Sub Command1_Click()
Dim strSQL As String
strSQL = "SELECT * FROM Customer " & _
"WHERE (HomePhone = """ & varHomePhone & """);"
Me.Data2.RecordSource = strSQL
Me.Data2.Refresh
Dim strSQL1 As String
Dim strKey1 As String
strKey = Text1.Text
strSQL = "SELECT * FROM Orders " & _
"WHERE (CustomerID = """ & strKey1 & """);"
Me.Data1.RecordSource = strSQL1
Me.Data2.Refresh
Me.MSFlexGrid1.Refresh
End Sub
I am trying to use a MSFlexGrid to display data from a MSAccess database.
Here is my code. I cant get the grid to show the results.I am very NEW to VB
and any help would be appreciated.
Thanks
Private Sub Command1_Click()
Dim strSQL As String
strSQL = "SELECT * FROM Customer " & _
"WHERE (HomePhone = """ & varHomePhone & """);"
Me.Data2.RecordSource = strSQL
Me.Data2.Refresh
Dim strSQL1 As String
Dim strKey1 As String
strKey = Text1.Text
strSQL = "SELECT * FROM Orders " & _
"WHERE (CustomerID = """ & strKey1 & """);"
Me.Data1.RecordSource = strSQL1
Me.Data2.Refresh
Me.MSFlexGrid1.Refresh
End Sub