I would like to get the records when I type the number into the text1.text. Why I not record found? Field name PLot is a number data type
Code:Set InfoRS = New ADODB.Recordset With InfoRS .ActiveConnection = conn .CursorType = adOpenStatic .LockType = adLockOptimistic .Open "SELECT pemilik.Plot,pemilik.Pemilik1,pemilik.Pemilik2,Tanah.[LUAS (Ha)],Tanah.KOMPARTMEN,Tanah.Blok,Tanah.[NAMA PROJEK],Tanah.Negeri FROM pemilik,tanah where pemilik.Plot = Tanah.Plot order by pemilik.plot asc" End With InfoRS.Open "SELECT pemilik.Plot,pemilik.Pemilik1,pemilik.Pemilik2,Tanah.[LUAS (Ha)],Tanah.KOMPARTMEN,Tanah.Blok,Tanah.[NAMA PROJEK],Tanah.Negeri FROM pemilik,tanah where pemilik.Plot = Tanah.Plot and pemilik.Plot = " & Text1.Text & "" With InfoRS Text2.Text = .Fields("Pemilik1").Value & "" Text3.Text = .Fields("Pemilik2").Value & "" Text19.Text = .Fields("LUAS (Ha)").Value & "" Combo6.Text = .Fields("NEGERI").Value & "" Combo7.Text = .Fields("KOMPARTMEN").Value Combo8.Text = .Fields("BLOK").Value & "" Combo9.Text = .Fields("NAMA PROJEK").Value & "" End With


Reply With Quote
