Sistema de Ventas de Autos con Base de Datos (Visual Basic)

CONSIGNA
Realizar un Sistema de Ventas de Autos con Base de Datos e informar: precio, descripción, modelo del auto y la comisión por venta.
INTERFAZ

Realizar las Bases de Datos, para ello ir a:
Complementos > Administrador de bases de datos...
Luego ir a Archivo > Nuevo... > Microsoft Access > MDB de la Version 7.0
Bases de Datos: marcas

Bases de Datos: vendedor

Bases de Datos: ventas

FUENTE
Private Sub ejecutar_Click()
Text3 = Val(Text2) * Val(Text4) / 100
Text5 = Val(Text2) + Val(Text3)
If Val(Text12) = 2014 Or 2015 Then
Text8 = Val(Text2) * 20 / 100
Else
Text8 = Val(Text2) * 25 / 100
End If
Text9 = Val(Text7) + Val(Text8)
Text10 = Val(Text9) + Val(Text5)
End Sub
Private Sub limpiar_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Text8 = ""
Text9 = ""
Text10 = ""
Text11 = ""
Text12 = ""
End Sub
Private Sub marcas_Click()
Set MYDB = DBEngine.Workspaces(0).OpenDatabase("E:\Programacion II\18-10\AUTOS.MDB")
Set MYTABLE = MYDB.OpenRecordset("SELECT * FROM marcas WHERE pat like " & "'" & Trim(Text1) & "';", dbOpenSnapshot)
Do While Not MYTABLE.EOF()
Text1 = MYTABLE("pat")
Text11 = MYTABLE("descripcion")
Text12 = MYTABLE("modelo")
MYTABLE.MoveNext
Loop
End Sub
Private Sub salir_Click()
Unload Me
End Sub
Private Sub vendedor_Click()
Set MYDB = DBEngine.Workspaces(0).OpenDatabase("E:\Programacion II\18-10\AUTOS.MDB")
Set MYTABLE = MYDB.OpenRecordset("SELECT * FROM vendedor WHERE dni like " & "'" & Trim(Text6) & "';", dbOpenSnapshot)
Do While Not MYTABLE.EOF()
Text6 = MYTABLE("dni")
Text7 = MYTABLE("sueldobas")
MYTABLE.MoveNext
Loop
End Sub
Private Sub ventas_Click()
Set MYDB = DBEngine.Workspaces(0).OpenDatabase("E:\Programacion II\18-10\AUTOS.MDB")
Set MYTABLE = MYDB.OpenRecordset("SELECT * FROM ventas WHERE pat like " & "'" & Trim(Text1) & "';", dbOpenSnapshot)
Do While Not MYTABLE.EOF()
Text1 = MYTABLE("pat")
Text2 = MYTABLE("precio")
MYTABLE.MoveNext
Loop
End Sub
