"aktualisierung nicht möglich; momentan gesperrt"

25/10/2007 - 16:23 von Jan Nitsch | Report spam
Hilfe!!!

Was gestern noch ging, geht heute nicht mehr!
Ich bekomme die Fehlermeldung: Aktualisierung nicht möglich; momentan
gesperrt. wenn ich ein Update auf einen Datensatz machen möchte...

Der komplette Code zu dem Formular sieht wie folgt aus:

Private Sub Form_Load()

Me.Filter = "[ausw] = True"
Me.FilterOn = True
DoCmd.Maximize


If Nz(Me!rm_feld1) = "" Then
Me!rm_feld1.Locked = False
Me!rm_feld1.Visible = True
Me!rm_l1.Visible = True
check = 1
Else
Me!rm_feld2.Locked = False
Me!rm_feld1.Visible = True
Me!rm_feld2.Visible = True
Me!rm_l1.Visible = True
Me!rm_l2.Visible = True
check = 2
End If

If Me!rm_feld2 <> "" Then
Me!rm_feld3.Locked = False
Me!rm_feld1.Locked = True
Me!rm_feld2.Locked = True
Me!rm_feld1.Visible = True
Me!rm_feld2.Visible = True
Me!rm_feld3.Visible = True
Me!rm_l1.Visible = True
Me!rm_l2.Visible = True
Me!rm_l3.Visible = True
check = 3
End If

If Me!rm_feld3 <> "" Then
Me!rm_feld4.Locked = False
Me!rm_feld1.Locked = True
Me!rm_feld2.Locked = True
Me!rm_feld3.Locked = True
Me!rm_feld1.Visible = True
Me!rm_feld2.Visible = True
Me!rm_feld3.Visible = True
Me!rm_feld4.Visible = True
Me!rm_l1.Visible = True
Me!rm_l2.Visible = True
Me!rm_l3.Visible = True
Me!rm_l4.Visible = True
check = 4
End If

If Me!rm_feld4 <> "" Then
Me!rm_feld5.Locked = False
Me!rm_feld1.Locked = True
Me!rm_feld2.Locked = True
Me!rm_feld3.Locked = True
Me!rm_feld4.Locked = True
Me!rm_feld1.Visible = True
Me!rm_feld2.Visible = True
Me!rm_feld3.Visible = True
Me!rm_feld4.Visible = True
Me!rm_feld5.Visible = True
Me!rm_l1.Visible = True
Me!rm_l2.Visible = True
Me!rm_l3.Visible = True
Me!rm_l4.Visible = True
Me!rm_l5.Visible = True
check = 5
End If

If Me!rm_feld5 <> "" Then
Me!rm_feld1.Locked = True
Me!rm_feld2.Locked = True
Me!rm_feld3.Locked = True
Me!rm_feld4.Locked = True
Me!rm_feld5.Locked = True
Me!rm_feld1.Visible = True
Me!rm_feld2.Visible = True
Me!rm_feld3.Visible = True
Me!rm_feld4.Visible = True
Me!rm_feld5.Visible = True
Me!rm_l1.Visible = True
Me!rm_l2.Visible = True
Me!rm_l3.Visible = True
Me!rm_l4.Visible = True
Me!rm_l5.Visible = True
Me!warnung.Visible = True
check = 6
End If
End Sub

Private Sub rm_eintragen1_Click()
On Error GoTo Err_rm_eintragen_Click

Select Case check
Case 1:
If Nz(Me!rm_feld1) = "" Then
MsgBox "Sie haben noch keine Rückmeldung gegeben."
Me!rm_feld1.SetFocus
Exit Sub
Else
strSQL = "UPDATE info SET Rückmeldung=True, " & _
"rm1='" & CurrentUser & " " & Now & " " & _
Me!rm_feld1 & "'" & _
"WHERE ausw=True;"
End If

Case 2:
If Nz(Me!rm_feld2) = "" Then
MsgBox "Sie haben noch keine Rückmeldung gegeben."
Me!rm_feld2.SetFocus
Exit Sub
Else
strSQL = "UPDATE info SET Rückmeldung=True, " & _
"rm2='" & CurrentUser & " " & Now & " " & _
Me!rm_feld2 & "'" & _
"WHERE ausw=True;"
End If

Case 3:
If Nz(Me!rm_feld3) = "" Then
MsgBox "Sie haben noch keine Rückmeldung gegeben."
Me!rm_feld3.SetFocus
Exit Sub
Else
strSQL = "UPDATE info SET Rückmeldung=True, " & _
"rm3='" & CurrentUser & " " & Now & " " & _
Me!rm_feld3 & "'" & _
"WHERE ausw=True;"
End If

Case 4:
If Nz(Me!rm_feld4) = "" Then
MsgBox "Sie haben noch keine Rückmeldung gegeben."
Me!rm_feld4.SetFocus
Exit Sub
Else
strSQL = "UPDATE info SET Rückmeldung=True, " & _
"rm4='" & CurrentUser & " " & Now & " " & _
Me!rm_feld4 & "'" & _
"WHERE ausw=True;"
End If

Case 5:
If Nz(Me!rm_feld5) = "" Then
MsgBox "Sie haben noch keine Rückmeldung gegeben."
Me!rm_feld5.SetFocus
Exit Sub
Else
strSQL = "UPDATE info SET Rückmeldung=True, " & _
"rm5='" & CurrentUser & " " & Now & " " & _
Me!rm_feld5 & "'" & _
"WHERE ausw=True;"
End If

Case 6:
MsgBox "Sie können keine Rückmeldungen mehr geben."
Exit Sub

End Select

CurrentDb.Execute strSQL, dbFailOnError

stDocName = "neu"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, Me.Name

Exit_rm_eintragen_Click:
Exit Sub

Err_rm_eintragen_Click:
MsgBox Err.Description
Resume Exit_rm_eintragen_Click

End Sub

Es kann doch nich sein, daß das gestern noch funktioniert hat, und
heute nicht mehr!!!
Hoffe auf Hilfe.
 

Lesen sie die antworten

#1 Thomas Möller
25/10/2007 - 18:50 | Warnen spam
Hallo Jan,

Jan Nitsch schrieb:
Private Sub Form_Load()

Me.Filter = "[ausw] = True"
Me.FilterOn = True
DoCmd.Maximize


If Nz(Me!rm_feld1) = "" Then
Me!rm_feld1.Locked = False
Me!rm_feld1.Visible = True
Me!rm_l1.Visible = True
check = 1
Else
Me!rm_feld2.Locked = False
Me!rm_feld1.Visible = True
Me!rm_feld2.Visible = True
Me!rm_l1.Visible = True
Me!rm_l2.Visible = True
check = 2
End If

If Me!rm_feld2 <> "" Then
Me!rm_feld3.Locked = False
Me!rm_feld1.Locked = True
Me!rm_feld2.Locked = True
Me!rm_feld1.Visible = True
Me!rm_feld2.Visible = True
Me!rm_feld3.Visible = True
Me!rm_l1.Visible = True
Me!rm_l2.Visible = True
Me!rm_l3.Visible = True
check = 3
End If

If Me!rm_feld3 <> "" Then
Me!rm_feld4.Locked = False
Me!rm_feld1.Locked = True
Me!rm_feld2.Locked = True
Me!rm_feld3.Locked = True
Me!rm_feld1.Visible = True
Me!rm_feld2.Visible = True
Me!rm_feld3.Visible = True
Me!rm_feld4.Visible = True
Me!rm_l1.Visible = True
Me!rm_l2.Visible = True
Me!rm_l3.Visible = True
Me!rm_l4.Visible = True
check = 4
End If

If Me!rm_feld4 <> "" Then
Me!rm_feld5.Locked = False
Me!rm_feld1.Locked = True
Me!rm_feld2.Locked = True
Me!rm_feld3.Locked = True
Me!rm_feld4.Locked = True
Me!rm_feld1.Visible = True
Me!rm_feld2.Visible = True
Me!rm_feld3.Visible = True
Me!rm_feld4.Visible = True
Me!rm_feld5.Visible = True
Me!rm_l1.Visible = True
Me!rm_l2.Visible = True
Me!rm_l3.Visible = True
Me!rm_l4.Visible = True
Me!rm_l5.Visible = True
check = 5
End If

If Me!rm_feld5 <> "" Then
Me!rm_feld1.Locked = True
Me!rm_feld2.Locked = True
Me!rm_feld3.Locked = True
Me!rm_feld4.Locked = True
Me!rm_feld5.Locked = True
Me!rm_feld1.Visible = True
Me!rm_feld2.Visible = True
Me!rm_feld3.Visible = True
Me!rm_feld4.Visible = True
Me!rm_feld5.Visible = True
Me!rm_l1.Visible = True
Me!rm_l2.Visible = True
Me!rm_l3.Visible = True
Me!rm_l4.Visible = True
Me!rm_l5.Visible = True
Me!warnung.Visible = True
check = 6
End If
End Sub




wenn diese Prüfungen auch beim Datensatzwechsel erfolgen sollen musst Du
den Code in das Ereignis "Beim Abzeigen" verschieben.


Es kann doch nich sein, daß das gestern noch funktioniert hat, und
heute nicht mehr!!!



Was hast Du den zwischen gestern und heute an der Datenbank geàndert?
Hast Du evtl. noch eine Sicherungskopie, mit der Du vergleichen kannst?


CU
Thomas

Homepage: www.Team-Moeller.de

Ähnliche fragen