Hello everyone,
excuse me if my english is not perfect! Thats because im from Holland.
So i have to build an application for my school wich teachers can use to check students in to schoolparty's.
The information from the students has to come out of a .mdb database.
this is what i want:
- fill in student number in textbox1 and get all the student information in the other textboxes
- automatically calculate the age of a student with the date of birth given in the database
- record the check in and check out time in my database
- if a student is already checked in , check out
this is what i have so far:
I really dont know where to start?! can someone help me pass my exams please!?
Attachment 99049Attachment 99051
excuse me if my english is not perfect! Thats because im from Holland.
So i have to build an application for my school wich teachers can use to check students in to schoolparty's.
The information from the students has to come out of a .mdb database.
this is what i want:
- fill in student number in textbox1 and get all the student information in the other textboxes
- automatically calculate the age of a student with the date of birth given in the database
- record the check in and check out time in my database
- if a student is already checked in , check out
this is what i have so far:
Code:
Imports System.Data.OleDb
Public Class Form1
Dim con As New OleDbConnection
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = "provider= microsoft.jet.oledb.4.0; data source = C:\Users\Gebruiker\Desktop\inf\DBVB.mdb"
con.Open()
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
End Sub
Private Sub Label9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label9.Click
End Sub
Private Sub Label11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label11.Click
End Sub
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ds As New DataSet
Dim dt As New DataTable
ds.Tables.Add(dt)
Dim da As New OleDbDataAdapter
da = New OleDbDataAdapter("SELECT * FROM party", con)
da.Fill(dt)
If My.Computer.FileSystem.FileExists("C:\Users\gebruiker\desktop\inf\" & TextBox1.Text & ".jpg") Then
PictureBox1.Image = Image.FromFile("C:\Users\gebruiker\desktop\inf\" & TextBox1.Text & ".jpg")
Else
PictureBox1.Image = Image.FromFile("C:\Users\gebruiker\desktop\inf\fout.jpg")
End If
End Sub
End Class
Attachment 99049Attachment 99051