VB Code:
  1. Private Sub cbovendname_Click()
  2. Dim intVendorId As Integer
  3. intVendorId = cbovendname.ItemData(cbovendname.ListIndex)
  4.  
  5. [B]Set adoRs.ActiveConnection = adoCn[/B]
  6.  
  7. With adoRs
  8.     adoRs.LockType = adLockReadOnly
  9.     adoRs.CursorType = adOpenKeyset
  10.     adoRs.Open "Select * From Vendor Where ID = " & intVendorId
  11. End With
  12.  
  13. txtlocation = adoRs!Location & ""
  14.  
  15. 'adoCn.Close
  16.  
  17. End Sub
Error on Bold line
Error No 3705
Operation is not allowed when object is open

When
cbovendname_click then Corresponding Location from Datbase Shown
at first instance showing Correct but when i select the IInd Time then It shows Above Error