borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (intelligent people help me)Next Topic (Business Software Development) New Topic New Poll Post Reply
AndreaVB Forum : VB.Net : help me auto populate
Poster Message
kalboako1987
Level: Trainee

Registered: 14-11-2007
Posts: 2

icon help me auto populate

hello guys

Im trying to autopopulate my form from a table in my database called Enrollment.it will fill the textboxes in my form whenever the id number typed in the textbox is existing in my database.. the selection will be based in the highest EnrollmentID whatever is the highest EnrollmentID that matches with id number will automatically fill the textboxes. i put these code inside my idnumber textbox by double clicking it. can somebody help me please...


i need all the advice that you can give me..



Private Sub populate()
        Dim xx As DataTable


        xx = db1.doQuery("select idno from Enrollment where idno='" + Me.txtidno.Text + "'")
        If xx.Rows.Count <> 0 Then
            MessageBox.Show("existing", "WARNING!", MessageBoxButtons.OK, MessageBoxIcon.Warning)
            xx = db1.doQuery("select Firstname, Middlename, Lastname, level1, preschoollevel,primarylevel,secondarylevel,tuitionfee, amountpaid,tobwithd,tobwithoutd from Enrollment where Firstname='" + Me.txtfirstname.Text + "', Middlename='" + Me.txtmi.Text + "', Lastname='" + Me.txtlastname.Text + "', level1 = '" + Me.ComboBox1.Text + "', preschoollevel='" + Me.cmbpreschool.Text + "', primarylevel='" + Me.cmbprimary.Text + "', secondarylevel ='" + Me.cmbsecondary.Text + "', tuitionfee='" + Me.TextBox5.Text + "', amountpaid ='" + Me.txtpreviousamountpaid.Text + "', tobwithd= '" + Me.txtbal.Text + "', tobwithoutd = '" + Me.txtbal.Text + "'")

[Edited by kalboako1987 on 15-11-2007 at 06:08 AM GMT]

14-11-2007 at 10:08 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB.Net : help me auto populate
Previous Topic (intelligent people help me)Next Topic (Business Software Development) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder