• Privacywetgeving
    Het is bij Helpmij.nl niet toegestaan om persoonsgegevens in een voorbeeld te plaatsen. Alle voorbeelden die persoonsgegevens bevatten zullen zonder opgaaf van reden verwijderd worden. In de vraag zal specifiek vermeld moeten worden dat het om fictieve namen gaat.

invoegen nieuwe regel

Status
Niet open voor verdere reacties.

kareltje555

Gebruiker
Lid geworden
22 sep 2011
Berichten
75
hoe voeg ik hier een nieuwe patiënt toe ??
Code:
Private Sub CBCoa_nr_Click()
Application.GoTo Sheets("ZoCo").Cells(1)
Dim Ctrl As Control
TB_coa_nr.Value = Me.CBCoa_nr.Column(0)
TBanaam.Value = Me.CBCoa_nr.Column(2)
TBvnaam.Value = Me.CBCoa_nr.Column(3)
TBmv.Value = Me.CBCoa_nr.Column(4)
TBlvh.Value = Me.CBCoa_nr.Column(5)
TBgebdatum.Value = Me.CBCoa_nr.Column(6)
CBzoco_naam.Value = Me.CBCoa_nr.Column(32)
CBzorgdomein.Value = Me.CBCoa_nr.Column(33)
TBomschrijving.Value = Me.CBCoa_nr.Column(34)
TBacties.Value = Me.CBCoa_nr.Column(35)
TBvervolg.Value = Me.CBCoa_nr.Column(36)
TextBox9.Value = Me.CBCoa_nr.Column(37)
TextBox10.Value = Me.CBCoa_nr.Column(38)
TextBox11.Value = Me.CBCoa_nr.Column(39)
TextBox12.Value = Me.CBCoa_nr.Column(40)
TextBox13.Value = Me.CBCoa_nr.Column(41)
TextBox14.Value = Me.CBCoa_nr.Column(42)
TextBox15.Value = Me.CBCoa_nr.Column(43)
TextBox16.Value = Me.CBCoa_nr.Column(44)
TextBox17.Value = Me.CBCoa_nr.Column(45)
TextBox18.Value = Me.CBCoa_nr.Column(46)
TBl_contact.Value = Me.CBCoa_nr.Column(47)
TBv_contact.Value = Me.CBCoa_nr.Column(48)

End Sub

Private Sub Cmbescape_Click()
Unload Me
Application.GoTo Sheets("welkom").Cells(1)
End Sub


Private Sub knop_stop_Click()
Unload Me
Application.GoTo Sheets("welkom").Cells(1)
End Sub
Private Sub knop_vervolg_Click()
Application.GoTo Sheets("ZoCo").Cells(1)
Dim sonsat As Integer

If CBCoa_nr.ListIndex = -1 Then
MsgBox "Maak uw keuze", vbExclamation
Exit Sub
End If

sonsat = CBCoa_nr.ListIndex + 2
Cells(sonsat, 2) = TB_coa_nr.Value
Cells(sonsat, 4) = TBanaam.Value
Cells(sonsat, 5) = TBvnaam.Value
Cells(sonsat, 6) = TBmv.Value
Cells(sonsat, 7) = TBlvh.Value
Cells(sonsat, 8) = TBgebdatum.Value
Cells(sonsat, 34) = CBzoco_naam.Value
Cells(sonsat, 35) = CBzorgdomein.Value
Cells(sonsat, 36) = TBomschrijving.Value
Cells(sonsat, 37) = TBacties.Value
Cells(sonsat, 38) = TBvervolg.Value
Cells(sonsat, 39) = TextBox9.Value
Cells(sonsat, 40) = TextBox10.Value
Cells(sonsat, 41) = TextBox11.Value
Cells(sonsat, 42) = TextBox12.Value
Cells(sonsat, 43) = TextBox13.Value
Cells(sonsat, 44) = TextBox14.Value
Cells(sonsat, 45) = TextBox15.Value
Cells(sonsat, 46) = TextBox16.Value
Cells(sonsat, 47) = TextBox17.Value
Cells(sonsat, 48) = TextBox18.Value
Cells(sonsat, 49) = TBl_contact.Value
Cells(sonsat, 50) = TBv_contact.Value

MsgBox "Ingave is aangepast"
CBCoa_nr.List = Sheets("ZoCo").Range("B2:AZ50" & [a65536].End(3).Row).Value
For Each Ctrl In Me.Controls
    If TypeName(Ctrl) = "TextBox" Or TypeName(Ctrl) = "ComboBox" Then
    Ctrl.Value = ""
    End If
Next Ctrl
End Sub

Private Sub knop_verwijder_Click()
Application.GoTo Sheets("ZoCo").Cells(1)
   Dim sil As Integer
   If CBCoa_nr.ListIndex = -1 Then
   MsgBox "Kies een ingave", vbExclamation
   Exit Sub
   End If
   If CBCoa_nr.ListIndex >= 0 Then
    cevap = MsgBox("Ingave wordt gewist, ben je zeker ?", vbYesNo)
If cevap = vbYes Then
          
             sil = CBCoa_nr.ListIndex + 2
           Sheets("ZoCo").Rows(sil).Delete
                     
        End If
        End If
CBCoa_nr.List = Sheets("ZoCo").Range("B2:AZ50" & [a65536].End(3).Row).Value
For Each Ctrl In Me.Controls
    If TypeName(Ctrl) = "TextBox" Or TypeName(Ctrl) = "ComboBox" Then
    Ctrl.Value = ""
    End If
Next Ctrl
End Sub



Private Sub UserForm_Initialize()
Application.GoTo Sheets("ZoCo").Cells(1)
CBCoa_nr.ColumnWidths = "60;0;70;70;15;50;50;0;0;50;50;50;50;50;50;50;50;50"
CBCoa_nr.ColumnCount = 18
CBCoa_nr.List = Sheets("ZoCo").Range("b2:AZ50" & [a65536].End(3).Row).Value           '[a65536].End
CBCoa_nr.Value = ""
TB_coa_nr.Value = ""
TBvnaam.Value = ""
TBanaam.Value = ""
TBgebdatum.Value = ""
TBmv.Value = ""
TBlvh.Value = ""
CBzoco_naam.Value = ""
CBzorgdomein.Value = ""
TBomschrijving.Value = ""
TBacties.Value = ""
TBvervolg.Value = ""
TextBox9.Value = ""
TextBox10.Value = ""
TextBox11.Value = ""
TextBox12.Value = ""
TextBox13.Value = ""
TextBox14.Value = ""
TextBox15.Value = ""
TextBox16.Value = ""
TextBox17.Value = ""
TextBox18.Value = ""
TBl_contact.Value = ""
TBv_contact.Value = ""
End Sub

Private Sub TBl_contact_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
CalendarFrm.Show
TBl_contact.Value = OnOfHold.TBdatum_van_cal.Value

End Sub



Private Sub TBv_contact_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
CalendarFrm.Show
TBv_contact.Value = OnOfHold.TBdatum_van_cal.Value

End Sub
 
Ik heb zo mijn vermoedens dat je weinig reactie krijgt met een weinig tot niets zeggende vraag.
Ik zou het in elk geval niet weten.

Het is maar een goed bedoelt berichtje.
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan