Version =20
VersionRequired =20
Checksum =176195135
Begin Form
    Modal = NotDefault
    RecordSelectors = NotDefault
    MaxButton = NotDefault
    MinButton = NotDefault
    ControlBox = NotDefault
    ShortcutMenu = NotDefault
    AutoCenter = NotDefault
    NavigationButtons = NotDefault
    CloseButton = NotDefault
    DividingLines = NotDefault
    DefaultView =0
    ScrollBars =0
    BorderStyle =1
    PictureAlignment =2
    DatasheetGridlinesBehavior =3
    GridX =5
    GridY =5
    Width =5896
    DatasheetFontHeight =10
    ItemSuffix =8
    Left =5055
    Top =2325
    Right =10950
    Bottom =4695
    DatasheetGridlinesColor =12632256
    RecSrcDt = Begin
        0xab610e9456f1e140
    End
    RecordSource ="tbl_AP_Datenherkunft"
    Caption ="Datenherkunft für Empfängerliste"
    DatasheetFontName ="Arial"
    OnLoad ="[Event Procedure]"
    Begin
        Begin Label
            BackStyle =0
        End
        Begin Rectangle
            SpecialEffect =3
            BackStyle =0
            Width =850
            Height =850
        End
        Begin CommandButton
            Width =1701
            Height =283
            FontSize =8
            FontWeight =400
            ForeColor =-2147483630
            FontName ="MS Sans Serif"
        End
        Begin TextBox
            SpecialEffect =2
            OldBorderStyle =0
            Width =1701
            LabelX =-1701
        End
        Begin ComboBox
            SpecialEffect =2
            Width =1701
            LabelX =-1701
        End
        Begin Section
            Height =2267
            BackColor =-2147483633
            Name ="Detailbereich"
            Begin
                Begin Rectangle
                    OverlapFlags =93
                    Left =113
                    Top =113
                    Width =5680
                    Height =1480
                    Name ="Rechteck0"
                End
                Begin CommandButton
                    OverlapFlags =85
                    Left =113
                    Top =1700
                    Width =1247
                    Height =458
                    TabIndex =4
                    ForeColor =0
                    Name ="OK"
                    Caption ="OK"
                    OnClick ="[Event Procedure]"
                End
                Begin ComboBox
                    LimitToList = NotDefault
                    OverlapFlags =215
                    Left =1817
                    Top =566
                    Width =3847
                    TabIndex =1
                    ColumnInfo ="\"\";\"\";\"10\";\"510\""
                    Name ="Tabelle"
                    ControlSource ="Tabelle"
                    RowSourceType ="Table/Query"
                    RowSource ="SELECT MSysObjects.Name FROM MSysObjects WHERE (((MSysObjects.Type)=1) AND ((MSy"
                        "sObjects.Flags)=0) AND ((LCase(Left([Name],4)))<>'usys')) OR (((MSysObjects.Fore"
                        "ignName) Is Not Null)) OR (((MSysObjects.Type)=5) AND ((MSysObjects.Flags)<>3)) "
                        "ORDER BY MSysObjects.Name;"
                    AfterUpdate ="[Event Procedure]"
                    OnDblClick ="=DropDown()"
                    Begin
                        Begin Label
                            OverlapFlags =223
                            Left =226
                            Top =566
                            Width =1605
                            Height =240
                            Name ="Bezeichnungsfeld8"
                            Caption ="Tabelle/Abfrage:"
                        End
                    End
                End
                Begin ComboBox
                    LimitToList = NotDefault
                    RowSourceTypeInt =10
                    OverlapFlags =215
                    Left =1817
                    Top =906
                    Width =3847
                    TabIndex =2
                    Name ="Feld_Name"
                    ControlSource ="Feld_Name"
                    RowSourceType ="Field List"
                    OnDblClick ="=DropDown()"
                    Begin
                        Begin Label
                            OverlapFlags =223
                            Left =231
                            Top =913
                            Width =1590
                            Height =240
                            Name ="Bezeichnungsfeld10"
                            Caption ="Feld für Empfänger:"
                        End
                    End
                End
                Begin ComboBox
                    LimitToList = NotDefault
                    RowSourceTypeInt =10
                    OverlapFlags =215
                    Left =1817
                    Top =1247
                    Width =3847
                    TabIndex =3
                    Name ="Feld_Email"
                    ControlSource ="Feld_Email"
                    RowSourceType ="Field List"
                    OnDblClick ="=DropDown()"
                    Begin
                        Begin Label
                            OverlapFlags =223
                            Left =226
                            Top =1254
                            Width =1590
                            Height =240
                            Name ="Bezeichnungsfeld12"
                            Caption ="Feld für Email:"
                        End
                    End
                End
                Begin TextBox
                    OverlapFlags =215
                    Left =1817
                    Top =226
                    Width =3847
                    Name ="Bezeichnung"
                    ControlSource ="Bezeichnung"
                    Begin
                        Begin Label
                            OverlapFlags =223
                            Left =226
                            Top =226
                            Width =1590
                            Height =240
                            Name ="Bezeichnungsfeld4"
                            Caption ="Bezeichnung:"
                        End
                    End
                End
                Begin CommandButton
                    OverlapFlags =85
                    Left =4546
                    Top =1700
                    Width =1247
                    Height =458
                    TabIndex =5
                    ForeColor =0
                    Name ="Abbrechen"
                    Caption ="Abbrechen"
                    OnClick ="[Event Procedure]"
                End
                Begin TextBox
                    Visible = NotDefault
                    OverlapFlags =85
                    Left =2040
                    Top =1814
                    TabIndex =6
                    BackColor =10092543
                    Name ="ID"
                    ControlSource ="ID"
                End
            End
        End
    End
End
CodeBehindForm
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Compare Database
Option Explicit

Private Sub Form_Load()
On Error GoTo Err_Form_Load

    If ((Not IsNull(Me![Tabelle])) And (Me![Tabelle] <> "")) Then
        Me![Feld_Name].RowSource = Me![Tabelle]
        Me![Feld_Email].RowSource = Me![Tabelle]
    End If

Exit_Form_Load:
    Exit Sub

Err_Form_Load:
    MsgBox Err.Description
    Resume Exit_Form_Load

End Sub
Private Sub OK_Click()
On Error GoTo Err_OK_Click

    Dim H_ID As Long

    If ((IsNull(Me![Bezeichnung])) Or (Me![Bezeichnung] = "")) Then
        Beep
        MsgBox "Das Formular ist nicht vollständig ausgefüllt!" & vbCrLf & "Bitte überprüfen Sie Ihre Eingaben.", vbOKOnly + vbCritical, AppName
        DoCmd.GoToControl "Bezeichnung"
        Exit Sub
    End If
    If ((IsNull(Me![Tabelle])) Or (Me![Tabelle] = "")) Then
        Beep
        MsgBox "Das Formular ist nicht vollständig ausgefüllt!" & vbCrLf & "Bitte überprüfen Sie Ihre Eingaben.", vbOKOnly + vbCritical, AppName
        DoCmd.GoToControl "Tabelle"
        Exit Sub
    End If
    If ((IsNull(Me![Feld_Name])) Or (Me![Feld_Name] = "")) Then
        Beep
        MsgBox "Das Formular ist nicht vollständig ausgefüllt!" & vbCrLf & "Bitte überprüfen Sie Ihre Eingaben.", vbOKOnly + vbCritical, AppName
        DoCmd.GoToControl "Feld_Name"
        Exit Sub
    End If
    If ((IsNull(Me![Feld_Email])) Or (Me![Feld_Email] = "")) Then
        Beep
        MsgBox "Das Formular ist nicht vollständig ausgefüllt!" & vbCrLf & "Bitte überprüfen Sie Ihre Eingaben.", vbOKOnly + vbCritical, AppName
        DoCmd.GoToControl "Feld_Email"
        Exit Sub
    End If
            
    H_ID = Me![ID]
    DoCmd.Close
    
    If IstGeladen("frm_AP_Datenherkunft_Liste") Then
        Forms![frm_AP_Datenherkunft_Liste]![Nr].Requery
        If Not IsNull(H_ID) Then
            Forms![frm_AP_Datenherkunft_Liste]![Nr] = H_ID
        End If
        DoCmd.GoToControl "Nr"
    End If
    
Exit_OK_Click:
    Exit Sub

Err_OK_Click:
    MsgBox Err.Description
    Resume Exit_OK_Click

End Sub
Private Sub Tabelle_AfterUpdate()
On Error GoTo Err_Tabelle_AfterUpdate

    If ((Not IsNull(Me![Tabelle])) And (Me![Tabelle] <> "")) Then
        Me![Feld_Name].RowSource = Me![Tabelle]
        Me![Feld_Email].RowSource = Me![Tabelle]
    End If
    
    Me![Feld_Name] = Null
    Me![Feld_Email] = Null
    
Exit_Tabelle_AfterUpdate:
    Exit Sub

Err_Tabelle_AfterUpdate:
    MsgBox Err.Description
    Resume Exit_Tabelle_AfterUpdate

End Sub
Private Sub Abbrechen_Click()
On Error GoTo Err_Abbrechen_Click

    SendKeys "{ESC}", True
    DoCmd.Close

Exit_Abbrechen_Click:
    Exit Sub

Err_Abbrechen_Click:
    MsgBox Err.Description
    Resume Exit_Abbrechen_Click

End Sub