title: vb6 error - expected procedure not variable
body: <p>hey i get the above error mentioned in the title when i press my search button</p>
  
  <p>here is the code</p>
  
  <p>i tried setting a break point and running the code but as soon as i press my search button an error message "EXPECTED PROCEDURE NOT VARIABLE" pops up </p>
  
  <p>im quite new to vb6 programming .. can anyone help ?</p>
  
  <pre><code>   Private Sub cmdsearch_Click()
  
      If txtvehiclenumber = "" Then
         MsgBox " Please enter a vehicle number"
      Else
  
  rsFiveGallonDelivery " select * from FiveGallonDelivery where Cstr(VehicleNumber) =  '" &amp; txtvehiclenumber &amp; "'", conn, adOpenDynamic, adLockReadOnly
  
  If Not rsFiveGallonDelivery.BOF And Not rsFiveGallonDelivery.EOF Then
  rsFiveGallonDelivery.MoveFirst
       txtdate = rsFiveGallonDelivery.Fields("Date")
       txtdeliverytimeoutrs = FiveGallonDelivery("DeliveryTimeOut")
       txtdeliverytimeinrs = FiveGallonDelivery("DeliveryTimeIn")
       txtfromfactory = rsFiveGallonDelivery.Fields("FromFactory")
       txtdeliverynotecount = rsFiveGallonDelivery.Fields("DeliveryNoteCount")
       txtfromoperations = rsFiveGallonDelivery.Fields("FromOperations")
       txtnormaldeliveries = rsFiveGallonDelivery.Fields("NormalDeliveries")
       txtnewdeliveries = rsFiveGallonDelivery.Fields("NewDeliveries")
       txtbottleincreases = rsFiveGallonDelivery.Fields("BottleIncreases")
       txtpromotions = rsFiveGallonDelivery.Fields("Promotions")
       txtreturnstooperations = rsFiveGallonDelivery.Fields("ReturnsToOperations")
       txtreturnstofactory = rsFiveGallonDelivery.Fields("ReturnsToFactory")
       txtfactorycount = rsFiveGallonDelivery.Fields("FactoryCount")
  
     Else
       MsgBox " No Such record "
    End If
    rsFiveGallonDelivery.Close
  
    End If
   End Sub
  </code></pre>