|
-
Jun 24th, 2004, 02:10 PM
#1
Thread Starter
Member
Required Parameters
Hi,
What is wrong with this
VB Code:
Private Sub cmdSearch_Click()
If Trim(txtPs.Text) <> "" Then
'we have something in the text box
rs.Open "SELECT * FROM UNPW WHERE unpw Like '" & Trim(txtPs.Text) & "'", cn, adOpenKeyset, adLockBatchOptimistic, adCmdText
If rs.EOF Then
'nothing was returned
txtUn.Text = ("NONE FOUND")
txtPw.Text = ("NONE FOUND")
Else
'We have one or more results
txtUn.Text = rs.Fields("UserName")
txtPw.Text = rs.Fields("PassWord")
End If
End If
rs.Close
End Sub
I get this error
No value given for one or more required parameters.
This code i working on another program I have, but for some reason it will not work on this one.
Thanks
-
Jun 24th, 2004, 04:38 PM
#2
Sleep mode
Originally posted by mhipate
Hi,
What is wrong with this
VB Code:
Private Sub cmdSearch_Click()
If Trim(txtPs.Text) <> "" Then
'we have something in the text box
rs.Open "SELECT * FROM UNPW WHERE unpw Like '" & Trim(txtPs.Text) & "'", cn, adOpenKeyset, adLockBatchOptimistic, adCmdText
If rs.EOF Then
'nothing was returned
txtUn.Text = ("NONE FOUND")
txtPw.Text = ("NONE FOUND")
Else
'We have one or more results
txtUn.Text = rs.Fields("UserName")
txtPw.Text = rs.Fields("PassWord")
End If
End If
rs.Close
End Sub
I get this error
No value given for one or more required parameters.
This code i working on another program I have, but for some reason it will not work on this one.
Thanks
Isn't this VB6 code ??
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
|