PDA

Click to See Complete Forum and Search --> : Help with MSFlex grid


paul
Aug 22nd, 1999, 10:45 PM
Hi
How can i get my MSFLEXGRID to refresh and show the results of
a SQL statement . Here is my code . Any help would be appreciated.
Private Sub Command1_Click()
Dim strSQL As String
strSQL = "SELECT * FROM Customer " & _
"WHERE (HomePhone = """ & Text3 & """);"
Me.Data1.RecordSource = strSQL
Me.Data1.Refresh
Text3.SelStart = 0
Text3.SelLength = Len(Text3.Text)
If Data1.Recordset.EOF = True Then
MsgBox " No Customer with this phone number."
Else
Call SeekPN
End If
End Sub


Private Sub SeekPN()
Dim strSQL As String
strSQL = "SELECT * FROM Customer " & _
"WHERE (CustID = """ & Label5 & """);"
Me.Data2.RecordSource = strSQL
MSFlexGrid1.Refresh
If Data1.Recordset.EOF = True Then
MsgBox " Customer has no orders."
Else
End If
End Sub