|
-
Jul 24th, 1999, 04:12 AM
#1
Thread Starter
New Member
I just want to allow users to find a record based on what they type into a text box on my search form. The data control is on my main form. All attempts to use different combinations of code fail. I am out of Advil & patience!!! Please look at this code and advise.
RK
Private Sub cmdOK_Click()
If Trim(txtFind) = "" Then Exit Sub
Dim SQL As String
Dim Name2Find As String
Name2Find = Trim(txtFind.Text)
SQL = "SELECT From Customers WHERE LastName Like '%" & txtFind.Text & "%'"
With frmMain.Data1
.RecordSource = SQL
.Refresh
End With
Unload Me
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
|