Reshmi mohankumar
Registered User.
- Local time
- Today, 07:42
- Joined
- Dec 5, 2017
- Messages
- 101
I need message pop up for not matching the value with combo box colomn(0) value. I used below code but not success. Please get me out from here. thank you.
Private Sub cboestdet_AfterUpdate()
Select Case cboestdet
Case Not (Me.cboestdet.Column(0))
MsgBox "Item not found", vbOKCancel
cboestdet.SetFocus
Case Else
Me.BARCODE.Value = Me.cboestdet.Column(0)
Me.Product.Value = Me.cboestdet.Column(1)
Me.Sub_product.Value = Me.cboestdet.Column(2)
Me.HSN_CODE.Value = Me.cboestdet.Column(3)
Me.Brand.Value = Me.cboestdet.Column(4)
Me.Profit_Rate.Value = Me.cboestdet.Column(5)
Me.QUANTITY.Value = Me.cboestdet.Column(6)
Me.Sales_Rate.Value = Me.cboestdet.Column(7)
Me.IS_Sold.Value = Me.cboestdet.Column(8)
Me.CGST.Value = Me.cboestdet.Column(9)
Me.SGST.Value = Me.cboestdet.Column(10)
txtProduct.SetFocus
txtSub_Product.SetFocus
txtHSN_CODE.SetFocus
txtProfit_Rate.SetFocus
txtQuantity.SetFocus
CGST.SetFocus
SGST.SetFocus
txtSales_Rate.SetFocus
End Select
End Sub
Private Sub cboestdet_AfterUpdate()
Select Case cboestdet
Case Not (Me.cboestdet.Column(0))
MsgBox "Item not found", vbOKCancel
cboestdet.SetFocus
Case Else
Me.BARCODE.Value = Me.cboestdet.Column(0)
Me.Product.Value = Me.cboestdet.Column(1)
Me.Sub_product.Value = Me.cboestdet.Column(2)
Me.HSN_CODE.Value = Me.cboestdet.Column(3)
Me.Brand.Value = Me.cboestdet.Column(4)
Me.Profit_Rate.Value = Me.cboestdet.Column(5)
Me.QUANTITY.Value = Me.cboestdet.Column(6)
Me.Sales_Rate.Value = Me.cboestdet.Column(7)
Me.IS_Sold.Value = Me.cboestdet.Column(8)
Me.CGST.Value = Me.cboestdet.Column(9)
Me.SGST.Value = Me.cboestdet.Column(10)
txtProduct.SetFocus
txtSub_Product.SetFocus
txtHSN_CODE.SetFocus
txtProfit_Rate.SetFocus
txtQuantity.SetFocus
CGST.SetFocus
SGST.SetFocus
txtSales_Rate.SetFocus
End Select
End Sub