Please help

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello everyone. I have been working on a project using adodb and access
and cannot for the life of me figure out why i get an error that says "
No Value Given for one or more Parameters".

Here is the code I am having trouble with( the first four lines):

str = "SELECT ContactName, CustConnection FROM contacts WHERE
CustConnection= " & cboCustomer.Text
Set ContRecSet = New ADODB.Recordset
ContRecSet.Open str, conn, adOpenForwardOnly, adLockReadOnly,
adCmdText
'loop through records and populate in the combobox

With ContRecSet
If Not (.BOF And .EOF) Then
Do Until .EOF
cboContacts.AddItem .Fields("ContactName")
cboContacts.ItemData(cboContacts.NewIndex) =
..Fields.Count
.MoveNext
Loop
Else
MsgBox "No records found"
End If
End With

.



Relevant Pages

  • Re: Please help
    ... CustConnection= " & cboCustomer.Text ... Set ContRecSet = New ADODB.Recordset ... ContRecSet.Open str, conn, adOpenForwardOnly, adLockReadOnly, ... If Not (.BOF And .EOF) Then ...
    (microsoft.public.vb.com)
  • Re: Please help
    ... str = "SELECT ContactName, CustConnection FROM contacts WHERE CustConnection= '" ... jumps to the EOF action. ... ContRecSet.Open= SELECT ContactName, CustConnection FROM contacts WHERE ...
    (microsoft.public.vb.com)
  • Re: Please help
    ... ContRecSet.Open= SELECT ContactName, CustConnection FROM contacts WHERE ... ContRecSet.Open str, conn, adOpenForwardOnly, adLockReadOnly, ... If Not (.BOF And .EOF) Then ...
    (microsoft.public.vb.com)
  • Re: Please help
    ... the code to proceed to the loop to populate the other combo box. ... ContRecSet.Open= SELECT ContactName, CustConnection FROM contacts WHERE ... ContRecSet.Open str, conn, adOpenForwardOnly, adLockReadOnly, ...
    (microsoft.public.vb.com)
  • Re: problem in a code with filehandling
    ... As you does NOT test the result of fscanf() you continues into ... unspecified behavior when it ends with either EOF oer error, so str ... no test for EOF or error is done, ... Visit http://www.ecomstation.de the home of german eComStation ...
    (comp.lang.c)