Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=PolysarDB.mdb;Persist Security Info=False"
Adodc1.RecordSource = "Select * From Table_products where 1, Cn, adOpenDynamic, adLockOptimistic "
End Sub
Private Sub txtSearch_Change()
On Error GoTo t
If Option1.Value = True Then
If txtSearch <> " " Then
Adodc1.Recordset.Filter = "Product_name like '%" & txtSearch & "%'"
Else
Adodc1.Refresh
End If
ElseIf Option2.Value = True Then
If txtSearch <> " " Then
Adodc1.Recordset.Filter = "Quantity like '%" & txtSearch & "%'"
Else
Adodc1.Refresh
End If
ElseIf Option3.Value = True Then
If txtSearch <> " " Then
Adodc1.Recordset.Filter = "Price like '%" & txtSearch & "%'"
Else
Adodc1.Refresh
End If
End If
If txtSearch.Text = "" Then
MsgBox "Select and enter search criteria", vbOKOnly
End If
Exit Sub
t:
MsgBox "Error: " & Err.Description, vbCritical
End Sub
1 Replies - 416 Views - Last Post: 08 November 2012 - 08:37 AM
#1
Arguments are wrong type are outofacceptable rangeorare in conflict on
Posted 08 November 2012 - 07:54 AM
Replies To: Arguments are wrong type are outofacceptable rangeorare in conflict on
#2
Re: Arguments are wrong type are outofacceptable rangeorare in conflict on
Posted 08 November 2012 - 08:37 AM
One: Do you have a question? Don't just drop code on people and be too lazy to describe anything. All you are really saying is "Do my debugging for me".
Two: Don't be so lazy that you can't put your code in code tags just like everyone else.

Three: Are you really learning/starting-out with VB6? Why? It's pretty much a dead language used only by people that support legacy systems. Its not a language to build new applications in for today's computers. You might want to make sure you're in the right forum.
Two: Don't be so lazy that you can't put your code in code tags just like everyone else.
Three: Are you really learning/starting-out with VB6? Why? It's pretty much a dead language used only by people that support legacy systems. Its not a language to build new applications in for today's computers. You might want to make sure you're in the right forum.
This post has been edited by tlhIn`toq: 08 November 2012 - 08:38 AM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|