I have come across a database that features the following code, which (I think) is designed to, after user confirmation, run an update query that updates some records as "signed-off" (i.e. validated).
The code is like so:
Here's what I don't understand.
There is no query, form or anything else, anywhere in the database, named Non-Programmable_Supervisor_Subform.
Searching for that text finds no other instance within the whole project.
There *is* a form called Non-Programmable Supervisor Subform (note lack of underscores)...wouldn't that be considered a different name?
Anyway, the code WORKS. It does what it's supposed to do. I just can't figure out how exactly it's doing it, nor have I had any luck keeping it working after some assorted database updates I am doing.
Anyone see anything that I'm clearly not seeing?
Thanks in advance.
The code is like so:
Code:
Private Sub Timestamp_Click()
On Error GoTo Err_Timestamp_Click
Dim stDocName As String
stDocName = "Non-Programmable Supervisor Update Query"
If MsgBox("You are about ot sign-off on the data in this table." & Chr(13) & _
"Do you want to continue?", vbYesNo, "CONTINUE?") = vbYes Then
DoCmd.SetWarnings False
DoCmd.OpenQuery stDocName, acNormal, acEdit
Me.Non_Programmable_Supervisor_Subform.Requery
DoCmd.SetWarnings True
End If
Exit_Timestamp_Click:
Exit Sub
Err_Timestamp_Click:
MsgBox Err.Description
Resume Exit_Timestamp_Click
End Sub
Here's what I don't understand.
There is no query, form or anything else, anywhere in the database, named Non-Programmable_Supervisor_Subform.
Searching for that text finds no other instance within the whole project.
There *is* a form called Non-Programmable Supervisor Subform (note lack of underscores)...wouldn't that be considered a different name?
Anyway, the code WORKS. It does what it's supposed to do. I just can't figure out how exactly it's doing it, nor have I had any luck keeping it working after some assorted database updates I am doing.
Anyone see anything that I'm clearly not seeing?
Thanks in advance.