I will use binding manager to add new or remove record and save it
sucesfully,
I test my programe, I addnew , input the new one, save it. Then search it at
once, I found that I cannot search my record.
Do I need to refill the dataset before search ???
If I refill the dataset after "SAVE", my doubt "[ the record will be showed
the 1st one or the last one, how can I point to that 'fresh records'
--my save button'
bmBase.EndCurrentEdit()
If dsBase.HasChanges() Then
daBase.Update(dsBase, "chartofaccount")
dsBase.AcceptChanges()
ENDIF
--- mySearch Button
Dim dvBase As New DataView(dsBase.Tables("ChartOfAccount"))
dvBase.Sort = "acctcode"
Me.pPosition = dvBase.Find(strSearchKey)
If Me.pPosition < 0 Then
MessageBox.Show("Record Is Not Found !", "Error Message",
MessageBoxButtons.OK, MessageBoxIcon.Error)
blnFlag = False
Else
bmBase.Position = Me.pPosition <--- It will show the wrong one
record.
endif