Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub Form_Load()
- Dim conn As String
- conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Tania\Escritorio\Programas\1\Doctores.mdb;Persist Security Info=False"
- Adodc1.ConnectionString = conn
- Adodc1.RecordSource = "select * from Citas"
- Adodc1.Refresh
- Combo1.AddItem "Alejandro"
- Combo1.AddItem "Karen"
- Combo1.AddItem "Matias"
- End Sub
- Private Sub Command1_Click()
- If Text1.Text = "" Then
- Exit Sub
- End If
- If Text2.Text = " " Then
- Exit Sub
- End If
- If Text3.Text = " " Then
- Exit Sub
- End If
- If Combo1.Text = "" Then
- Exit Sub
- End If
- Adodc1.Recordset.AddNew
- Adodc1.Recordset!fecha = Text1.Text
- Adodc1.Recordset!paciente = Text2.Text
- Adodc1.Recordset!hora = Text3.Text
- Adodc1.Recordset!doctor = Combo1.Text
- Adodc1.Recordset.Update
- Text1.Text = " "
- Text2.Text = " "
- Text3.Text = " "
- Combo1.Text = " "
- Call orden
- End Sub
- Private Sub orden()
- Picture1.Cls
- If Adodc1.Recordset.RecordCount > 0 Then
- Adodc1.Recordset.MoveFirst
- End If
- With Adodc1.Recordset
- Do While Not Adodc1.Recordset.EOF
- Picture1.Print !fecha & " " & !paciente & "" & !hora & " " & !doctor & ""
- Adodc1.Recordset.MoveNext
- Loop
- End With
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement