Error on Bold lineVB Code:
Private Sub cbovendname_Click() Dim intVendorId As Integer intVendorId = cbovendname.ItemData(cbovendname.ListIndex) [B]Set adoRs.ActiveConnection = adoCn[/B] With adoRs adoRs.LockType = adLockReadOnly adoRs.CursorType = adOpenKeyset adoRs.Open "Select * From Vendor Where ID = " & intVendorId End With txtlocation = adoRs!Location & "" 'adoCn.Close End Sub
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




Reply With Quote