1 Replies - 774 Views - Last Post: 08 November 2012 - 08:37 AM Rate Topic: -----

#1 UnnameD~  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-November 12

Arguments are wrong type are outofacceptable rangeorare in conflict on

Posted 08 November 2012 - 07:54 AM

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

Is This A Good Question/Topic? 0
  • +

Replies To: Arguments are wrong type are outofacceptable rangeorare in conflict on

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5436
  • View blog
  • Posts: 11,649
  • Joined: 02-June 10

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.
:code:

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

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1