I have problem here.. I want to query. When the textbox is null then I got the messagebox twice. Why?
Code:Private Sub Text2_Change() On Error GoTo error databasepetatable 'connect record table peta menggunakan modul syskod tablesys.Close tablesys.Open "Select * from peta where Kod = '" & Text2.Text & "'", consys, adOpenDynamic, adLockOptimistic If Not tablesys.BOF And Not tablesys.EOF Then Text10.Text = tablesys.Fields("Peta").Value Else MsgBox ("Tiada Rekod dijumpai") Text2.Text = "" Text10.Text = "" End If error: End Sub




Reply With Quote