Forum Discussion
hubervin
Nov 14, 2019Copper Contributor
Access error: "Query is corrupt"
Hi! With the new update in Office 365 I have this problem with update queries. They only work for queries of the table, for the actual table it can't update it, because it says "query is corrupt". W...
wadeness98
Jan 15, 2020Copper Contributor
Same here. I don't have authority to update/uninstall updates on my user PCs. Offending code:
' *** Process User privileges ***
Set rstTable = New ADODB.Recordset
With rstTable
Set .ActiveConnection = cn
.Source = "Select * from z_qry_Punch_IO"
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.Open
Global_USER_ID = getUserName() ' Make sure we capture this before processing
If Not .BOF Then
.MoveFirst
If !ad_id <> Global_USER_ID Then .Find "[AD_ID]='" & Global_USER_ID & "'"
End If
If Not .EOF Then
!Punch_Out = Now()
ElseIf .EOF Then
MsgBox "You are not registered in the database. Timer events are disabled. Contact your administrator for details.", vbOKOnly, "UserID not found"
GoTo Lost_ID
End If
.Update ' *** CORRUPTION NOW REPORTED ***
End With