i have been using adodc for searching for a client's details using the client number, but it would give me inexpected errors and bomb out of my programme. i have then resorted to searching using sql. the following code gives me this error:::
no value given for one or more required parameters
this error is pointed at line 7 in the following code.
the code thats producing this error is:::
Private Sub cmdcnsearch_Click() sql = "Select companyname,companysize,country,city from cooperate where CSTR(accnumber)='" & txtcnsearch.Text & "'" Set conn = New Connection Set r = New Recordset conn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Subscriptions Project\subscriptions.mdb" With r .Open sql, conn, adOpenKeyset, adLockOptimistic, adCmdText If .EOF Then MsgBox "Record not found", vbExclamation txtcnsearch.SelStart = 0 txtcnsearch.SelLength = Len(txtcnsearch.Text) txtcnsearch.SetFocus Exit Sub 'to populate the field Else txtccname = r!CompanyName txtcsize.Text = r!companysize txtcountry.Text = r!country txtcity.Text = r!city r.Close End If End With End Sub
can you help me please!!!