I've had a delete user query for some time now and never noticed what it was doing until today. The Query goes like this:
Name
User Table
Where
[Forms]![Delete User Form]![Name]
and
AccessLevel
User Table
Where
<> "Administration"
Okay, this is all good. The Button for this is on a form with a ComboBox that lists the names of the individuals in the User Table. When I select the user to be deleted from the User Table you go through the regular prompts for the deletion and the user is deleted, but then the user at the top of the table has there name changed to the user that was just deleted.
The VB for the button is:
Option Compare Database
'-- delete user from the database
Private Sub Delete_User_Button_Click()
On Error GoTo Err_Delete_User_Button_Click
Dim stDocName As String
stDocName = "Delete User Query"
DoCmd.OpenQuery stDocName, , acEdit
DoCmd.Close
Exit_Delete_User_Button_Click:
Exit Sub
Err_Delete_User_Button_Click:
MsgBox Err.Description
Resume Exit_Delete_User_Button_Click
End Sub
Why is the query doing that to the table and can it be stopped.
Thanks
Love and Kisses
Demons
Name
User Table
Where
[Forms]![Delete User Form]![Name]
and
AccessLevel
User Table
Where
<> "Administration"
Okay, this is all good. The Button for this is on a form with a ComboBox that lists the names of the individuals in the User Table. When I select the user to be deleted from the User Table you go through the regular prompts for the deletion and the user is deleted, but then the user at the top of the table has there name changed to the user that was just deleted.
The VB for the button is:
Option Compare Database
'-- delete user from the database
Private Sub Delete_User_Button_Click()
On Error GoTo Err_Delete_User_Button_Click
Dim stDocName As String
stDocName = "Delete User Query"
DoCmd.OpenQuery stDocName, , acEdit
DoCmd.Close
Exit_Delete_User_Button_Click:
Exit Sub
Err_Delete_User_Button_Click:
MsgBox Err.Description
Resume Exit_Delete_User_Button_Click
End Sub
Why is the query doing that to the table and can it be stopped.
Thanks
Love and Kisses
Demons