Hi , i use enable choice function to enable or disable the ADD button for data grid.
now when i tried to use the code for update button its not working..
need to add cmdUpdateEntry.
here is the code..
Sub EnableChoice()
' disable to remove button
' check to see if every text field has contents. If they all have
' contents (ie, they're not empty) enable the "Add Entry" button.
If txtDate.Text <> "" _
And txtCodeNo.Text <> "" _
And txtDealerName.Text <> "" _
And txtTruckNumber.Text <> "" _
And txtProduct.Text <> "" _
And txtQuantity.Text <> "" _
And txtNetPrice.Text <> "" _
And txtCommision.Text <> "" _
And txtRent.Text <> "" _
And txtLabour.Text <> "" _
And txtReturnExpense.Text <> "" _
And txtExpense2.Text <> "" _
And txtStoreExpense.Text <> "" _
And txtPhoneExpense.Text <> "" _
And txtExpense3.Text <> "" _
And txtTotalExpense.Text <> "" _
And txtTotal.Text <> "" Then
cmdAddEntry.Enabled = True
Else
cmdAddEntry.Enabled = False
End If
cmdRemoveEntry.Enabled = False
End Sub