İl Açılır Kutusu’nun (txtil) satır kaynağı İLLER tablosu,
Kod:
WebBrowser1.Document.getElementById("ctlCity").Value = txtil.Value
Kod:
WebBrowser1.Document.getElementById("ctlQueryFromPersonalInfo").Click
webbrowser1'de ilçeler yenilendiğinde her ilçe için farklı olan İLÇENO webbrowser1'deki ctlDistrict alanına aktarılmak üzere seçiliyor (sorgulama esnasında aktarılacak.) Her ilçeye ait bir numara var, mesela Gümüşhacıköy 1368
Formda il, ilçe, ad ve soyad yazıldıktan sonra resim doğrulama alanına girildiğinde
Kod:
Dim HTML_Body As Object, HTML_Img As Object, MyImg As Object
Set HTML_Body = WebBrowser1.Document.All.tags("Body").Item(0)
Set HTML_Img = HTML_Body.GetElementsByTagName("img")
Set MyImg = HTML_Img(4)
imgurl = MyImg.src
WebBrowser2.Navigate2 imgurl
Set HTML_Body = Nothing
Set HTML_Img = Nothing
Set MyImg = Nothing
Set IE = Nothing
Kodu ile webbrowser1’deki resim webbrowser2’ye aktarılıyor.
Forma yazılması gereken diğer veriler yazıldıktan sonra sorgulama yapılması için sorgula1 veya sorgula2 butonunun tıklanması gerekli. Mesela sorgula1 butonunun kodları.
Kod:
Call Sorgu1
WebBrowser2.Visible = False
ProgressBar1.Visible = False
Etiket86.Visible = True
ProgressBar1.Visible = True
Etiket86.Visible = False
For A = 1 To 100
ProgressBar1.Value = A
For B = 1 To 2000000
Next B
Next A
ProgressBar1.Visible = False
MsgBox "Sorgulama Tamamlandı.", vbInformation, "B İ L G İ "
Call Aktar
If Metin138.Value = "Ad" Then MsgBox "TC KİMLİK NUMARASI BULUNAMADI. BİLGİLERİ VE RESİM DOĞRULAMAYI KONTROL EDEREK TEKRAR DENEYİNİZ", vbInformation, "TC KİMLİK"
DoCmd.GoToControl "RESİMDOĞRULAMA"
Call Aktar
WebBrowser2.Visible = False
WebBrowser3.Visible = False
WebBrowser4.Visible = False
WebBrowser5.Visible = False
WebBrowser6.Visible = False
Buton tıklandığında call Sorgu1 kodundaki
Kod:
WebBrowser1.Document.All("mnbxSecurityCode").Value = RESİMDOĞRULAMA.Value
WebBrowser1.Document.getElementById("ctlCity").Value = txtil.Value
WebBrowser1.Document.getElementById("ctlDistrict").Value = txtilçe.Value
WebBrowser1.Document.All("ctlFirstName").Value = ctlFirstName.Value
WebBrowser1.Document.All("ctlLastName").Value = ctlLastName.Value
WebBrowser1.Document.All("ctlCilt").Value = txtCiltNo.Value
WebBrowser1.Document.All("ctlAileSiraNo").Value = txtAileSıraNo.Value
WebBrowser1.Document.All("ctlSiraNo").Value = txtBireySıraNo.Value
IE.Document.Forms(0).Elements("ctlQueryFromData").Click
call Sorgu1 in hemen altındaki kodlar ile
Kod:
WebBrowser2.Visible = False
ProgressBar1.Visible = False
Etiket86.Visible = True
ProgressBar1.Visible = True
Etiket86.Visible = False
For A = 1 To 100
ProgressBar1.Value = A
For B = 1 To 2000000
Next B
Next A
ProgressBar1.Visible = False
MsgBox "Sorgulama Tamamlandı.", vbInformation, "B İ L G İ "
bu işlem bitince formda “Sorgulama Tamamlandı” yazan mesaj kutusu açılıyor. Tamam tıklandığında
Kod:
Dim IE As Object
Set IE = Me.WebBrowser1
Me.Metin147 = IE.Document.All.tags("table").Item(17).Rows(0).Cells(1).innerText
Me.Metin148 = IE.Document.All.tags("table").Item(18).Rows(0).Cells(1).innerText
Me.Metin149 = IE.Document.All.tags("table").Item(18).Rows(0).Cells(3).innerText
Me.Metin159 = IE.Document.All.tags("table").Item(18).Rows(1).Cells(1).innerText
Me.Metin161 = IE.Document.All.tags("table").Item(18).Rows(1).Cells(3).innerText
Me.Metin163 = IE.Document.All.tags("table").Item(18).Rows(2).Cells(1).innerText
Me.Metin165 = IE.Document.All.tags("table").Item(18).Rows(2).Cells(3).innerText
Me.Metin167 = IE.Document.All.tags("table").Item(18).Rows(3).Cells(1).innerText
Me.Metin169 = IE.Document.All.tags("table").Item(18).Rows(3).Cells(3).innerText
Me.Metin171 = IE.Document.All.tags("table").Item(18).Rows(4).Cells(1).innerText
Me.Metin173 = IE.Document.All.tags("table").Item(18).Rows(4).Cells(3).innerText
Me.Metin175 = IE.Document.All.tags("table").Item(18).Rows(5).Cells(1).innerText
Me.Metin177 = IE.Document.All.tags("table").Item(18).Rows(5).Cells(3).innerText
Metin138.Value = Mid(WebBrowser1.Document.All.tags("table").Item(15).innerText, 18, 2)
Set IE = Nothing
Kod:
IE.Document.All.tags("table").Item(17).Rows(0).Cells(1).innerText
Kod:
Metin138.Value = Mid(WebBrowser1.Document.All.tags("table").Item(15).innerText, 18, 2)
Kod:
If Metin138.Value = "Ad" Then MsgBox "TC KİMLİK NUMARASI BULUNAMADI. BİLGİLERİ VE RESİM DOĞRULAMAYI KONTROL EDEREK TEKRAR DENEYİNİZ", vbInformation, "TC KİMLİK"
Ayrıca forma veri girilirken doğum yılı TARİHLER tablosundan alınıyor,
Kod:
If Me.txtCinsiyet.Value = "Erkek" Then Me.cboCinsiyet.Value = "E" Else Me.cboCinsiyet.Value = "K"
Bu uygulama trafiğe kapalı alanda yapılmıştır, sağlığınız için evde denemeyiniz.