[size=2][color=#0000ff]Private[/color][/size][size=2][color=#0000ff]Sub[/color][/size][size=2] FormShow()
[/size][size=2][color=#0000ff]Dim[/color][/size][size=2] oCmd [/size][size=2][color=#0000ff]As[/color][/size][size=2] OleDbCommand
[/size][size=2][color=#0000ff]Dim[/color][/size][size=2] oDr [/size][size=2][color=#0000ff]As[/color][/size][size=2] OleDbDataReader
[/size][size=2][color=#0000ff]Dim[/color][/size][size=2] strSQL [/size][size=2][color=#0000ff]As [/color][/size][size=2][color=#0000ff]String
[/color][/size][size=2]strSQL = "SELECT Voorletters, Aanspreeknaam, Tussenvoegsel, "
strSQL &= "Geslacht, Adres, Postcode, Plaats, Provincie, "
strSQL &= "Geboortedatum, Notities, Telefoon_Prive, Mobiele_Telefoon,"
strSQL &= "Faxnummer, Email_Adres, Telefoon_Werk, Toestelnummer, Functie, "
strSQL &= "Soort_Lid, Lidnummer, Ftk_Nummer, Lid_Sinds, Kilometer_1982, "
strSQL &= "Kilometer_1983, Kilometer_1984, Kilometer_1985, Kilometer_1986, "
strSQL &= "Kilometer_1987, Kilometer_1988, Kilometer_1989, Kilometer_1990,"
strSQL &= " Kilometer_1991, Kilometer_1992, Kilometer_1993, Kilometer_1994, "
strSQL &= "Kilometer_1995, Kilometer_1996, Kilometer_1997, Kilometer_1998, "
strSQL &= "Kilometer_1999, Kilometer_2000, Kilometer_2001, Kilometer_2002, "
strSQL &= "Kilometer_2003, Kilometer_2004, Kilometer_2005, Kilometer_2006, "
strSQL &= "Kilometer_2007, Kilometer_2008, Kilometer_2009, Kilometer_2010, "
strSQL &= "Kilometer_Totaal, Kosten_Lid, Kosten_Lid_Methode "
strSQL &= "FROM Gegevens WHERE Id = "
[/size]
[size=2][color=#0000ff]Try
[/color][/size][size=2] oCmd = [/size][size=2][color=#0000ff]New[/color][/size][size=2] OleDbCommand
[/size][size=2][color=#0000ff]With[/color][/size][size=2] oCmd
.Connection = ktcConnection
.Connection.Open()
.CommandText = strSQL
oDr = .ExecuteReader()
[/size][size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]With
[/color][/size]
[size=2][color=#0000ff]If[/color][/size][size=2] oDr.Read() [/size][size=2][color=#0000ff]Then
[/color][/size][size=2][color=#0000ff] With[/color][/size][size=2] oDr
txtVoorletters.Text = .Item("Voorletters").ToString()
txtAanspreeknaam.Text = .Item("Aanspreeknaam").ToString()
[/size]
[size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]With
[/color][/size][size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]If[/color][/size]
[size=2][color=#0000ff]
[/color][/size][size=2]oDr.Close()
oCmd.Connection.Close()
[/size][size=2][color=#0000ff]Catch[/color][/size][size=2] ex [/size][size=2][color=#0000ff]As[/color][/size][size=2] Exception
MessageBox.Show(ex.Message)
[/size][size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]Try
[/color][/size][size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]Sub
[/color][/size]