Results 1 to 9 of 9
  1. #1
    snoopy is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53

    runtime error code 2427 expression with no value

    There are some problems with my ms access database. It is a multi user db and there is one form created by a query which different information (depends on which user logon).

    So there is a run time error (2427) by one use, who wants to open the form. Anyway with different users, even from the same group it is working very well. May some of you do have a idea whats going wrong here?

    Furthermore,part of the code:

    Private Sub Form_Open(Cancel As Integer)



    Select Case Me.[Text44]

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Has the db been split, so that you have one back end db that just has the tables and a front end db on each users machine.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    snoopy is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    Sure, it is splitted into one fronted and backend. Backend is shared by different users on a network. Each user has his own account with pw.

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Only one front end? You should have a copy of the front end on each computer.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    snoopy is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    Sure, each user has his own copy of frontend on their desktop.
    Actually, I am not really in with Access, have also in mind migrate the db from access to a better database environment. Anyway there should be some solution what's going wrong there.

  6. #6
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    You might want to post the code, as right now all I can see is the first two lines.

  7. #7
    snoopy is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    Quote Originally Posted by R_Badger View Post
    You might want to post the code, as right now all I can see is the first two lines.
    Ok, well see the code attached
    Thanks for your help



    Option Compare Database

    Private Sub Command21_Click()
    On Error GoTo Err_Command21_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "fo_Project_Umfang"

    stLinkCriteria = "[nummer]=" & Me![Nummer]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_Command21_Click:
    Exit Sub

    Err_Command21_Click:
    MsgBox Err.Description
    Resume Exit_Command21_Click

    End Sub
    Private Sub Command22_Click()
    On Error GoTo Err_Command22_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "fo_neuanlageprojekt"

    stLinkCriteria = tab_nm_Projekt_Umfang![Nummer] = " & tab_nm_Projekt_Umfang![Nummer]"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_Command22_Click:
    Exit Sub

    Err_Command22_Click:
    MsgBox Err.Description
    Resume Exit_Command22_Click

    End Sub

    Private Sub Combo103_Change()
    Me.Refresh
    End Sub

    Private Sub Command25_Click()
    On Error GoTo Err_command25_Click


    DoCmd.Close
    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "fo_start"


    DoCmd.OpenForm stDocName

    Exit_command25_Click:
    Exit Sub

    Err_command25_Click:
    MsgBox Err.Description
    Resume Exit_command25_Click

    End Sub
    Private Sub Command26_Click()
    On Error GoTo Err_Command26_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "fo_neuanlageprojekt"

    stLinkCriteria = "[nummer]=" & Me![Nummer]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_Command26_Click:
    Exit Sub

    Err_Command26_Click:
    MsgBox Err.Description
    Resume Exit_Command26_Click

    End Sub
    Private Sub Command45_Click()
    On Error GoTo Err_Command45_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "fo_project_Umfang_TE"

    stLinkCriteria = "[nummer]=" & Me![Nummer]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_Command45_Click:
    Exit Sub

    Err_Command45_Click:
    MsgBox Err.Description
    Resume Exit_Command45_Click

    End Sub
    Private Sub Command47_Click()
    On Error GoTo Err_Command47_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "fo_TEvorNomination"

    stLinkCriteria = "[nummer]=" & Me![Nummer]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_Command47_Click:
    Exit Sub

    Err_Command47_Click:
    MsgBox Err.Description
    Resume Exit_Command47_Click

    End Sub
    Private Sub Command48_Click()
    On Error GoTo Err_Command48_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "fo_TEnachNomination"

    stLinkCriteria = "[nummer]=" & Me![Nummer]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_Command48_Click:
    Exit Sub

    Err_Command48_Click:
    MsgBox Err.Description
    Resume Exit_Command48_Click

    End Sub
    Private Sub Command50_Click()
    On Error GoTo Err_Command50_Click



    If Forms!fo_alle_Projekte![Text44] = "B" Or Forms!fo_alle_Projekte![Text44] = "LB" Then
    DoCmd.RunMacro ("Maske B")
    End If
    If Forms!fo_alle_Projekte![Text44] = "TE" Then
    DoCmd.RunMacro ("Maske TE")
    End If


    Exit_Command50_Click:
    Exit Sub

    Err_Command50_Click:
    MsgBox Err.Description
    Resume Exit_Command50_Click

    End Sub
    Private Sub Command51_Click()
    On Error GoTo Err_Command51_Click


    Screen.PreviousControl.SetFocus
    DoCmd.FindNext

    Exit_Command51_Click:
    Exit Sub

    Err_Command51_Click:
    MsgBox Err.Description
    Resume Exit_Command51_Click

    End Sub
    Private Sub Command53_Click()
    On Error GoTo Err_Command53_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "fo_TE"

    stLinkCriteria = "[nummer]=" & Me![Nummer]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_Command53_Click:
    Exit Sub

    Err_Command53_Click:
    MsgBox Err.Description
    Resume Exit_Command53_Click

    End Sub

    Private Sub Command68_Click()
    On Error GoTo Err_Command68_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "fo_neuanlageprojekt"

    stLinkCriteria = "[tab_nm_Projekt_Umfang].[nummer]=" & Me![Nummer]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Forms.fo_neuanlageprojekt.Command12.Visible = False

    Exit_Command68_Click:
    Exit Sub

    Err_Command68_Click:
    MsgBox Err.Description
    Resume Exit_Command68_Click
    End Sub


    Private Sub Command71_Click()
    If Forms!fo_start![Text44] = "B" Or Forms!fo_start![Text44] = "LB" Then
    DoCmd.RunMacro ("Filter Status 3 und 4 B")
    Forms!fo_alleProjekte![Command68].Visible = True
    End If
    If Forms!fo_start![Text44] = "TE" Then
    DoCmd.RunMacro ("Filter Status 3 und 4 TE")
    Forms!fo_alleProjekte![Command68].Visible = False
    End If
    If Forms!fo_start![Text44] = "GQ" Then
    DoCmd.RunMacro ("Filter Status 3 und 4 GQ")
    Forms!fo_alleProjekte.[Command68].Visible = False
    End If
    If Forms!fo_start![Text44] = "LOG" Then
    DoCmd.RunMacro ("Filter Status 3 und 4 LOG")
    Forms!fo_alleProjekte.[Command68].Visible = False
    End If
    If Forms!fo_start![Text44] = "WZTV" Then
    DoCmd.RunMacro ("Filter Status 3 und 4 PR")
    Forms!fo_alleProjekte.[Command68].Visible = False
    End If
    End Sub

    Private Sub Command72_Click()
    If Forms!fo_start![Text44] = "B" Or Forms!fo_start![Text44] = "LB" Then
    DoCmd.RunMacro ("Filter Status 5 B")
    Forms!fo_alleProjekte![Command68].Visible = True
    End If
    If Forms!fo_start![Text44] = "TE" Then
    DoCmd.RunMacro ("Filter Status 5 TE")
    Forms!fo_alleProjekte![Command68].Visible = False
    End If
    If Forms!fo_start![Text44] = "GQ" Then
    DoCmd.RunMacro ("Filter Status 5 GQ")
    Forms!fo_alleProjekte.[Command68].Visible = False
    End If
    If Forms!fo_start![Text44] = "LOG" Then
    DoCmd.RunMacro ("Filter Status 5 LOG")
    Forms!fo_alleProjekte.[Command68].Visible = False
    End If
    If Forms!fo_start![Text44] = "WZTV" Then
    DoCmd.RunMacro ("Filter Status 5 PR")
    Forms!fo_alleProjekte.[Command68].Visible = False
    End If
    End Sub

    Private Sub Command73_Click()
    If Forms!fo_start![Text44] = "B" Or Forms!fo_start![Text44] = "LB" Then
    DoCmd.RunMacro ("Filter Status 1 bis 5 B")
    Forms!fo_alleProjekte![Command68].Visible = True
    End If
    If Forms!fo_start![Text44] = "TE" Then
    DoCmd.RunMacro ("Filter Status 1 bis 5 TE")
    Forms!fo_alleProjekte![Command68].Visible = False
    End If
    If Forms!fo_start![Text44] = "GQ" Then
    DoCmd.RunMacro ("Filter Status 1 bis 5 GQ")
    Forms!fo_alleProjekte.[Command68].Visible = False
    End If
    If Forms!fo_start![Text44] = "LOG" Then
    DoCmd.RunMacro ("Filter Status 1 bis 5 LOG")
    Forms!fo_alleProjekte.[Command68].Visible = False
    End If
    If Forms!fo_start![Text44] = "WZTV" Then
    DoCmd.RunMacro ("Filter Status 1 bis 5 PR")
    Forms!fo_alleProjekte.[Command68].Visible = False
    End If
    End Sub

    Private Sub Filter_Status_0_2_Click()
    If Forms!fo_start![Text44] = "B" Or Forms!fo_start![Text44] = "LB" Then
    DoCmd.RunMacro ("Filter Status 0 bis 2 B")
    Forms!fo_alleProjekte![Command68].Visible = True
    End If
    If Forms!fo_start![Text44] = "TE" Then
    DoCmd.RunMacro ("Filter Status 0 bis 2 TE")
    Forms!fo_alleProjekte![Command68].Visible = False
    End If
    If Forms!fo_start![Text44] = "GQ" Then
    DoCmd.RunMacro ("Filter Status 0 bis 2 GQ")
    Forms!fo_alleProjekte.[Command68].Visible = False
    End If
    If Forms!fo_start![Text44] = "LOG" Then
    DoCmd.RunMacro ("Filter Status 0 bis 2 LOG")
    Forms!fo_alleProjekte.[Command68].Visible = False
    End If
    If Forms!fo_start![Text44] = "WZTV" Then
    DoCmd.RunMacro ("Filter Status 0 bis 2 PR")
    Forms!fo_alleProjekte.[Command68].Visible = False
    End If
    End Sub

    Private Sub Form_GotFocus()
    Me![Entscheidung in].Requery
    End Sub


    Private Sub Form_Open(Cancel As Integer)

    Select Case Me.[Text44] // In Debug, Error occurs here
    Case Is = "TE"
    'TE-Prio
    Me.TE_Prio.Visible = True
    Me.Label56.Visible = True
    'ToDo meine
    Me.Label95.Visible = True
    Me.Text99.Visible = True
    'ToDo alle
    Me.Label98.Visible = False
    Me.Text100.Visible = False
    'ToDo AbR meine
    Me.Label96.Visible = True
    Me.Text97.Visible = True
    'ToDo Abr alle
    Me.Label114.Visible = False
    Me.Text115.Visible = False
    'Ampel TE
    Me.Text78.Visible = True
    Me.Text88.Visible = True
    'Ampel Q
    Me.Text79.Visible = False
    Me.Text89.Visible = False
    'Ampel LO
    Me.Text82.Visible = False
    Me.Text92.Visible = False
    'Ampel PR
    Me.Text80.Visible = False
    Me.Text90.Visible = False
    'Ampel B
    Me.Text81.Visible = False
    Me.Text91.Visible = False
    'Funktion ToDo anlegen
    Me.Ereignis_Label.Visible = True
    Me.Combo103.Visible = True
    Me.Text108.Visible = True
    Me.Text110.Visible = True
    Me.Command105.Visible = True

    Case Is = "B"
    'Chance
    Me.Label112.Visible = True
    Me.Check113.Visible = True
    'TE-Prio
    Me.TE_Prio.Visible = False
    Me.Label56.Visible = False
    'ToDo meine
    Me.Label95.Visible = True
    Me.Text99.Visible = True
    'ToDo alle
    Me.Label98.Visible = False
    Me.Text100.Visible = False
    'ToDo AbR meine
    Me.Label96.Visible = True
    Me.Text97.Visible = True
    'ToDo Abr alle
    Me.Label114.Visible = False
    Me.Text115.Visible = False
    'Ampel TE
    Me.Text78.Visible = False
    Me.Text88.Visible = False
    'Ampel Q
    Me.Text79.Visible = False
    Me.Text89.Visible = False
    'Ampel LO
    Me.Text82.Visible = False
    Me.Text92.Visible = False
    'Ampel PR
    Me.Text80.Visible = False
    Me.Text90.Visible = False
    'Ampel B
    Me.Text81.Visible = True
    Me.Text91.Visible = True
    'Funktion ToDo anlegen
    Me.Ereignis_Label.Visible = True
    Me.Combo103.Visible = True
    Me.Text108.Visible = True
    Me.Text110.Visible = True
    Me.Command105.Visible = True

    Case Is = "LB"
    'Chance
    Me.Label112.Visible = True
    Me.Check113.Visible = True
    'TE-Prio
    Me.TE_Prio.Visible = False
    Me.Label56.Visible = False
    'ToDo meine
    Me.Label95.Visible = True
    Me.Text99.Visible = True
    'ToDo alle
    Me.Label98.Visible = False
    Me.Text100.Visible = False
    'ToDo AbR meine
    Me.Label96.Visible = True
    Me.Text97.Visible = True
    'ToDo Abr alle
    Me.Label114.Visible = False
    Me.Text115.Visible = False
    'Ampel TE
    Me.Text78.Visible = False
    Me.Text88.Visible = False
    'Ampel Q
    Me.Text79.Visible = False
    Me.Text89.Visible = False
    'Ampel LO
    Me.Text82.Visible = False
    Me.Text92.Visible = False
    'Ampel PR
    Me.Text80.Visible = False
    Me.Text90.Visible = False
    'Ampel B
    Me.Text81.Visible = True
    Me.Text91.Visible = True
    'Funktion ToDo anlegen
    Me.Ereignis_Label.Visible = True
    Me.Combo103.Visible = True
    Me.Text108.Visible = True
    Me.Text110.Visible = True
    Me.Command105.Visible = True

    Case Is = "WZTV"
    'TE-Prio
    Me.TE_Prio.Visible = False
    Me.Label56.Visible = False
    'ToDo meine
    Me.Label95.Visible = True
    Me.Text99.Visible = True
    'ToDo alle
    Me.Label98.Visible = False
    Me.Text100.Visible = False
    'ToDo AbR meine
    Me.Label96.Visible = True
    Me.Text97.Visible = True
    'ToDo Abr alle
    Me.Label114.Visible = False
    Me.Text115.Visible = False
    'Ampel TE
    Me.Text78.Visible = False
    Me.Text88.Visible = False
    'Ampel Q
    Me.Text79.Visible = False
    Me.Text89.Visible = False
    'Ampel LO
    Me.Text82.Visible = False
    Me.Text92.Visible = False
    'Ampel PR
    Me.Text80.Visible = True
    Me.Text90.Visible = True
    'Ampel B
    Me.Text81.Visible = False
    Me.Text91.Visible = False
    'Funktion ToDo anlegen
    Me.Ereignis_Label.Visible = True
    Me.Combo103.Visible = True
    Me.Text108.Visible = True
    Me.Text110.Visible = True
    Me.Command105.Visible = True

    Case Is = "LOG"
    'TE-Prio
    Me.TE_Prio.Visible = False
    Me.Label56.Visible = False
    'ToDo meine
    Me.Label95.Visible = True
    Me.Text99.Visible = True
    'ToDo alle
    Me.Label98.Visible = False
    Me.Text100.Visible = False
    'ToDo AbR meine
    Me.Label96.Visible = True
    Me.Text97.Visible = True
    'ToDo Abr alle
    Me.Label114.Visible = False
    Me.Text115.Visible = False
    'Ampel TE
    Me.Text78.Visible = False
    Me.Text88.Visible = False
    'Ampel Q
    Me.Text79.Visible = False
    Me.Text89.Visible = False
    'Ampel LO
    Me.Text82.Visible = True
    Me.Text92.Visible = True
    'Ampel PR
    Me.Text80.Visible = False
    Me.Text90.Visible = False
    'Ampel B
    Me.Text81.Visible = False
    Me.Text91.Visible = False
    'Funktion ToDo anlegen
    Me.Ereignis_Label.Visible = True
    Me.Combo103.Visible = True
    Me.Text108.Visible = True
    Me.Text110.Visible = True
    Me.Command105.Visible = True

    Case Is = "GQ"
    'TE-Prio
    Me.TE_Prio.Visible = False
    Me.Label56.Visible = False
    'ToDo meine
    Me.Label95.Visible = True
    Me.Text99.Visible = True
    'ToDo alle
    Me.Label98.Visible = False
    Me.Text100.Visible = False
    'ToDo AbR meine
    Me.Label96.Visible = True
    Me.Text97.Visible = True
    'ToDo Abr alle
    Me.Label114.Visible = False
    Me.Text115.Visible = False
    'Ampel TE
    Me.Text78.Visible = False
    Me.Text88.Visible = False
    'Ampel Q
    Me.Text79.Visible = True
    Me.Text89.Visible = True
    'Ampel LO
    Me.Text82.Visible = False
    Me.Text92.Visible = False
    'Ampel PR
    Me.Text80.Visible = False
    Me.Text90.Visible = False
    'Ampel B
    Me.Text81.Visible = False
    Me.Text91.Visible = False
    'Funktion ToDo anlegen
    Me.Ereignis_Label.Visible = True
    Me.Combo103.Visible = True
    Me.Text108.Visible = True
    Me.Text110.Visible = True
    Me.Command105.Visible = True

    Case Is = "ADM"
    'Chance
    Me.Label112.Visible = True
    Me.Check113.Visible = True
    'TE-Prio
    Me.TE_Prio.Visible = False
    Me.Label56.Visible = False
    'ToDo meine
    Me.Label95.Visible = False
    Me.Text99.Visible = False
    'ToDo alle
    Me.Label98.Visible = True
    Me.Text100.Visible = True
    'ToDo AbR meine
    Me.Label96.Visible = False
    Me.Text97.Visible = False
    'ToDo Abr alle
    Me.Label114.Visible = True
    Me.Text115.Visible = True
    'Ampel TE
    Me.Text78.Visible = True
    Me.Text88.Visible = True
    'Ampel Q
    Me.Text79.Visible = True
    Me.Text89.Visible = True
    'Ampel LO
    Me.Text82.Visible = True
    Me.Text92.Visible = True
    'Ampel PR
    Me.Text80.Visible = True
    Me.Text90.Visible = True
    'Ampel B
    Me.Text81.Visible = True
    Me.Text91.Visible = True
    'Funktion ToDo anlegen
    Me.Ereignis_Label.Visible = True
    Me.Combo103.Visible = True
    Me.Text108.Visible = True
    Me.Text110.Visible = True
    Me.Command105.Visible = True

    End Select

    End Sub

    Private Sub Command74_Click()
    On Error GoTo Err_Command74_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "formAuswProjektuebersicht"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_Command74_Click:
    Exit Sub

    Err_Command74_Click:
    MsgBox Err.Description
    Resume Exit_Command74_Click

    End Sub



    Private Sub Text78_Click()
    Dim stDocName As String
    Dim stFilter As String
    Dim Register As Integer

    'If [Forms]![fo_start]![Textbox_Name] = "AbstR" Or [Forms]![fo_start]![Textbox_Name] = "..." Then

    stDocName = "fo_TE"
    stFilter = "[nummer]=[Forms]![fo_alleProjekte].Nummer"

    If [Forms]![fo_alleProjekte].[Status HS aktuell].Value < 3 Then
    Register = 0
    Else
    Register = 2
    End If

    DoCmd.OpenForm stDocName, acNormal, , stFilter

    [Forms]![fo_TE].[TabCtl185].Value = Register

    'Else: End If
    End Sub

    Private Sub Text79_Click()
    Dim stDocName As String
    Dim stFilter As String
    Dim Register As Integer

    'If [Forms]![fo_start]![Textbox_Name] = "AbstR" Or [Forms]![fo_start]![Textbox_Name] = "..." Then

    stDocName = "fo_GQ"
    stFilter = "[nummer]=[Forms]![fo_alleProjekte].Nummer"

    If [Forms]![fo_alleProjekte].[Status HS aktuell].Value < 3 Then
    Register = 0
    Else
    Register = 2
    End If

    DoCmd.OpenForm stDocName, acNormal, , stFilter

    [Forms]![fo_GQ].[TabCtl185].Value = Register

    'Else: End If
    End Sub
    Private Sub Text81_Click()
    Dim stDocName As String
    Dim stFilter As String
    Dim Register As Integer

    'If [Forms]![fo_start]![Textbox_Name] = "AbstR" Or [Forms]![fo_start]![Textbox_Name] = "..." Then

    stDocName = "fo_Project_Umfang"
    stFilter = "[nummer]=[Forms]![fo_alleProjekte].Nummer"

    If [Forms]![fo_alleProjekte].[Status HS aktuell].Value < 3 Then
    Register = 4
    Else
    Register = 5
    End If

    DoCmd.OpenForm stDocName, acNormal, , stFilter

    [Forms]![fo_Project_Umfang].[TabCtl185].Value = Register

    'Else: End If
    End Sub
    Private Sub Text91_Click()
    Dim stDocName As String
    Dim stFilter As String
    Dim Register As Integer

    'If [Forms]![fo_start]![Textbox_Name] = "AbstR" Or [Forms]![fo_start]![Textbox_Name] = "..." Then

    stDocName = "fo_Project_Umfang"
    stFilter = "[nummer]=[Forms]![fo_alleProjekte].Nummer"

    If [Forms]![fo_alleProjekte].[Status HS aktuell].Value < 3 Then
    Register = 4
    Else
    Register = 5
    End If

    DoCmd.OpenForm stDocName, acNormal, , stFilter

    [Forms]![fo_Project_Umfang].[TabCtl185].Value = Register

    'Else: End If
    End Sub
    Private Sub Text80_Click()
    Dim stDocName As String
    Dim stFilter As String
    Dim Register As Integer

    'If [Forms]![fo_start]![Textbox_Name] = "AbstR" Or [Forms]![fo_start]![Textbox_Name] = "..." Then

    stDocName = "fo_PR"
    stFilter = "[nummer]=[Forms]![fo_alleProjekte].Nummer"

    If [Forms]![fo_alleProjekte].[Status HS aktuell].Value < 3 Then
    Register = 0
    Else
    Register = 1
    End If

    DoCmd.OpenForm stDocName, acNormal, , stFilter

    [Forms]![fo_PR].[TabCtl185].Value = Register

    'Else: End If
    End Sub
    Private Sub Text90_Click()
    Dim stDocName As String
    Dim stFilter As String
    Dim Register As Integer

    'If [Forms]![fo_start]![Textbox_Name] = "AbstR" Or [Forms]![fo_start]![Textbox_Name] = "..." Then

    stDocName = "fo_PR"
    stFilter = "[nummer]=[Forms]![fo_alleProjekte].Nummer"

    If [Forms]![fo_alleProjekte].[Status HS aktuell].Value < 3 Then
    Register = 0
    Else
    Register = 1
    End If

    DoCmd.OpenForm stDocName, acNormal, , stFilter

    [Forms]![fo_PR].[TabCtl185].Value = Register

    'Else: End If
    End Sub

    Private Sub Text82_Click()
    Dim stDocName As String
    Dim stFilter As String
    Dim Register As Integer

    'If [Forms]![fo_start]![Textbox_Name] = "AbstR" Or [Forms]![fo_start]![Textbox_Name] = "..." Then

    stDocName = "fo_LOG"
    stFilter = "[nummer]=[Forms]![fo_alleProjekte].Nummer"

    If [Forms]![fo_alleProjekte].[Status HS aktuell].Value < 3 Then
    Register = 0
    Else
    Register = 2
    End If

    DoCmd.OpenForm stDocName, acNormal, , stFilter

    [Forms]![fo_LOG].[TabCtl185].Value = Register

    'Else: End If
    End Sub

    Private Sub Text88_Click()
    Dim stDocName As String
    Dim stFilter As String
    Dim Register As Integer

    'If [Forms]![fo_start]![Textbox_Name] = "AbstR" Or [Forms]![fo_start]![Textbox_Name] = "..." Then

    stDocName = "fo_TE"
    stFilter = "[nummer]=[Forms]![fo_alleProjekte].Nummer"

    If [Forms]![fo_alleProjekte].[Status HS aktuell].Value < 3 Then
    Register = 0
    Else
    Register = 2
    End If

    DoCmd.OpenForm stDocName, acNormal, , stFilter

    [Forms]![fo_TE].[TabCtl185].Value = Register

    'Else: End If
    End Sub

    Private Sub Text89_Click()
    Dim stDocName As String
    Dim stFilter As String
    Dim Register As Integer

    'If [Forms]![fo_start]![Textbox_Name] = "AbstR" Or [Forms]![fo_start]![Textbox_Name] = "..." Then

    stDocName = "fo_GQ"
    stFilter = "[nummer]=[Forms]![fo_alleProjekte].Nummer"

    If [Forms]![fo_alleProjekte].[Status HS aktuell].Value < 3 Then
    Register = 0
    Else
    Register = 2
    End If

    DoCmd.OpenForm stDocName, acNormal, , stFilter

    [Forms]![fo_GQ].[TabCtl185].Value = Register

    'Else: End If
    End Sub



    Private Sub Text92_Click()
    Dim stDocName As String
    Dim stFilter As String
    Dim Register As Integer

    'If [Forms]![fo_start]![Textbox_Name] = "AbstR" Or [Forms]![fo_start]![Textbox_Name] = "..." Then

    stDocName = "fo_LOG"
    stFilter = "[nummer]=[Forms]![fo_alleProjekte].Nummer"

    If [Forms]![fo_alleProjekte].[Status HS aktuell].Value < 3 Then
    Register = 0
    Else
    Register = 2
    End If

    DoCmd.OpenForm stDocName, acNormal, , stFilter

    [Forms]![fo_LOG].[TabCtl185].Value = Register

    'Else: End If
    End Sub
    Private Sub Command105_Click()
    On Error GoTo Err_Command105_Click

    Dim stDocName As String
    Dim stDocName1 As String
    Dim stLinkCriteria As String

    'Pruefung, ob ein Ereignis der Art Abstimmungsrunde ausgewahlt ist

    If IsNull(Me![Combo103]) = True Then
    MsgBox ("Bitte zuerst ein Ereignis auswaehlen!")
    GoTo weiter
    Else: End If

    stDocName1 = "tab_aufgaben Unterformular"
    stDocName = "fo_Ereignis"

    stLinkCriteria = "[Ereignisnummer]=" & Me![Combo103]
    DoCmd.OpenForm stDocName, , , stLinkCriteria
    Forms![fo_Ereignis]![tab_aufgaben Unterformular].SetFocus
    DoCmd.GoToRecord , , acNewRec

    Forms![fo_Ereignis]![tab_aufgaben Unterformular]![Combo2].Value = Forms![fo_alleProjekte].Nummer

    Forms![fo_Ereignis]![tab_aufgaben Unterformular]![Beschreibung].SetFocus

    ' Forms(stDocName1)![Erstellungsdatum].Value = Date - 10
    'Forms(frmName)!typ = "A"
    'Forms(frmName)!Anzahl = 9999
    'Forms(frmName)!neu.SetFocus

    weiter:
    Exit_Command105_Click:
    Exit Sub

    Err_Command105_Click:
    MsgBox Err.Description
    Resume Exit_Command105_Click

    End Sub
    Private Sub Command111_Click()
    On Error GoTo Err_Command111_Click


    'Ampel TE
    Me.Text78.Visible = True
    Me.Text88.Visible = True
    'Ampel Q
    Me.Text79.Visible = True
    Me.Text89.Visible = True
    'Ampel LO
    Me.Text82.Visible = True
    Me.Text92.Visible = True
    'Ampel PR
    Me.Text80.Visible = True
    Me.Text90.Visible = True
    'Ampel B
    Me.Text81.Visible = True
    Me.Text91.Visible = True
    'ToDo meine
    Me.Label95.Visible = True
    Me.Text99.Visible = True
    'ToDo alle
    Me.Label98.Visible = True
    Me.Text100.Visible = True
    'ToDo AbR meine
    Me.Label96.Visible = True
    Me.Text97.Visible = True
    'ToDo Abr alle
    Me.Label114.Visible = True
    Me.Text115.Visible = True

    Exit_Command111_Click:
    Exit Sub

    Err_Command111_Click:
    MsgBox Err.Description
    Resume Exit_Command111_Click

    End Sub
    Private Sub Command119_Click()
    On Error GoTo Err_Command119_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "abf_Bericht_Todoneu"

    stLinkCriteria = "[tab_nm_Projekt_Umfang.Nummer]=" & Me![Nummer]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_Command119_Click:
    Exit Sub

    Err_Command119_Click:
    MsgBox Err.Description
    Resume Exit_Command119_Click

    End Sub

    Private Sub Text97_Click()

    On Error GoTo Err_Command119_Click

    Dim stDocName As String
    Dim stLinkCriteria As String
    Dim stFilter As String
    Dim stName As String

    stName = "'Meyer, Joern'"

    stDocName = "abf_Bericht_Todoneu"
    stFilter = "IsNull([Erledigt am]) = True AND [Verantwortlich] = " & [Forms]![fo_start]![Text90].Value

    stFilter = stFilter & " AND [tab_nm_Projekt_Umfang.Nummer]=" & Me![Nummer]
    stFilter = stFilter & " AND [Art des Eintrags] = '3'"
    stFilter = stFilter & " AND [tab_ns_ereignisart.nummer] > 9 AND [tab_ns_ereignisart.nummer] < 16"

    'MsgBox (stFilter)
    DoCmd.OpenForm stDocName, , , stFilter


    stDocName = "abf_Bericht_Todoneu"

    Exit_Command119_Click:
    Exit Sub

    Err_Command119_Click:
    MsgBox Err.Description
    Resume Exit_Command119_Click

    End Sub
    Private Sub Text115_Click()
    On Error GoTo Err_Command119_Click

    Dim stDocName As String
    Dim stLinkCriteria As String
    Dim stFilter As String
    Dim stName As String

    stName = "'Meyer, Joern'"

    stDocName = "abf_Bericht_Todoneu"
    stFilter = "IsNull([Erledigt am]) = True" ' AND [Verantwortlich] = " & [Forms]![fo_start]![Text90].Value

    stFilter = stFilter & " AND [tab_nm_Projekt_Umfang.Nummer]=" & Me![Nummer]
    stFilter = stFilter & " AND [Art des Eintrags] = '3'"
    stFilter = stFilter & " AND [tab_ns_ereignisart.nummer] > 9 AND [tab_ns_ereignisart.nummer] < 16"

    'MsgBox (stFilter)
    DoCmd.OpenForm stDocName, , , stFilter


    stDocName = "abf_Bericht_Todoneu"

    Exit_Command119_Click:
    Exit Sub

    Err_Command119_Click:
    MsgBox Err.Description
    Resume Exit_Command119_Click

    End Sub

    Private Sub Text99_Click()
    On Error GoTo Err_Command119_Click

    Dim stDocName As String
    Dim stLinkCriteria As String
    Dim stFilter As String
    Dim stName As String

    stName = "'Meyer, Joern'"

    stDocName = "abf_Bericht_Todoneu"
    stFilter = "IsNull([Erledigt am]) = True AND [Verantwortlich] = " & [Forms]![fo_start]![Text90].Value

    stFilter = stFilter & " AND [tab_nm_Projekt_Umfang.Nummer]=" & Me![Nummer]
    stFilter = stFilter & " AND [Art des Eintrags] = '3'"
    'MsgBox (stFilter)
    DoCmd.OpenForm stDocName, , , stFilter


    stDocName = "abf_Bericht_Todoneu"

    Exit_Command119_Click:
    Exit Sub

    Err_Command119_Click:
    MsgBox Err.Description
    Resume Exit_Command119_Click

    End Sub
    Private Sub Text100_Click()
    On Error GoTo Err_Command119_Click

    Dim stDocName As String
    Dim stLinkCriteria As String
    Dim stFilter As String
    Dim stName As String

    'stName = "'Meyer, Joern'"

    stDocName = "abf_Bericht_Todoneu"
    stFilter = "IsNull([Erledigt am]) = True" ' AND [Verantwortlich] = " & [Forms]![fo_start]![Text90].Value

    stFilter = stFilter & " AND [tab_nm_Projekt_Umfang.Nummer]=" & Me![Nummer]
    stFilter = stFilter & " AND [Art des Eintrags] = '3'"
    'MsgBox (stFilter)
    DoCmd.OpenForm stDocName, , , stFilter


    stDocName = "abf_Bericht_Todoneu"

    Exit_Command119_Click:
    Exit Sub

    Err_Command119_Click:
    MsgBox Err.Description
    Resume Exit_Command119_Click

    End Sub

    Private Sub Command126_Click()
    On Error GoTo Err_Command126_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frm_Detailbericht"

    stLinkCriteria = "[nummer]=" & Me![Nummer]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_Command126_Click:
    Exit Sub

    Err_Command126_Click:
    MsgBox Err.Description
    Resume Exit_Command126_Click

    End Sub

  8. #8
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    Regarding the code below what exactly is supposed to happen with text44?

    Code:
    Private Sub Form_Open(Cancel As Integer)
    
    Select Case Me.[Text44]   // In Debug, Error occurs here
    Because you are using it on form open it runs prior to values being loaded to the current form, so I am surprised it works, you could trying moving that section of code to the form_load event

  9. #9
    snoopy is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    Ok,

    problem was an wrong relationship. Code isn't really written lyrical, but it works.

    Thanks for responses

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 05-30-2012, 12:32 PM
  2. Replies: 1
    Last Post: 05-11-2012, 10:59 AM
  3. Replies: 8
    Last Post: 04-03-2012, 12:00 PM
  4. RunTime Error 3075, code for search button
    By jacie in forum Programming
    Replies: 1
    Last Post: 04-15-2011, 05:23 AM
  5. Runtime error in preventing duplicates code
    By emilyrogers in forum Access
    Replies: 10
    Last Post: 10-07-2010, 08:14 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums