|
-
Aug 22nd, 1999, 10:45 PM
#1
Thread Starter
Lively Member
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
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
|