as a way of refreshing my datagridview i rerun my query after every command.
on my delete button i use the same procedure but as a result it will clear
all the results. can anyone help me how to recode my procedure? this is my
code:
With myquery
myd = .runQuery(" DELETE FROM tbltrcclient WHERE ClientID = " & frmseededit.
TextBox4.Text.T oString & " ; ")
MsgBox("Client deleted.")
With myquery
myd = .runQuery(" SELECT ClientID, Lastname, Firstname, Barangay, TypeofSeed,
TypeofArea, Hectares FROM agri.tbltrcclie nt WHERE TypeofSeed = 0 AND
(tbltrcclient.L astname Like '" & frmseedsearch.T extBox2.Text & "' OR
tbltrcclient.Fi rstname LIKE '" & frmseedsearch.T extBox3.Text & "' OR
tbltrcclient.Ba rangay = '" & frmseedsearch.C omboBox6.Text & "' OR
(tbltrcclient.T ypeofSeed = '" & frmseedsearch.C omboBox1.Text & "' AND
(tbltrcclient.T ypeofArea = '" & frmseedsearch.C omboBox2.Text & "' OR
tbltrcclient.Ty peofArea = '" & frmseedsearch.C omboBox3.Text & "'))) ")
End With
DataGridView1.D ataSource = myd
DataGridView1.R efresh()
End With
--
Message posted via DotNetMonster.c om
http://www.dotnetmonster.com/Uwe/For...b-net/200804/1