Share via

Button no longer working

Anonymous
2023-08-16T14:10:57+00:00

I don't know what I changed to cause this. There was a windows/office update recently for my company, so maybe that? This is across multiple forms with the same sort of setup.

I have a set of continuous forms with a list of records. One of the fields of the table the form is tied to is a Yes/No field called Active. I have a button on the continuous form that changes a record on the active form by making it inactive. And a button on the inactive form that makes the record active. (Changing it from Yes to No and vice versa). It's worked fine for a long time now. But now all of a sudden I'm getting errors.

"You can't assign a value to this object. frmActiveEquipment.btnDeactivate Error number: 2448" Below is the code for one of the buttons. They're all the same, just changing the Me.Active.Value from True/False. The only change is that it was originally Me.Active = False. I gave Me.Active.Value = False a shot when the error first started happening.

Any advice on what to change and/or why this was working and now isnt?

Private Sub btnDeactivate_Click() 

 On Error GoTo Err_Handler 

    Debug.Print "btnDeactivate Clicked" 

    Me.Active.Value = False 

    Globals.RequeryAllSubforms 

Exit_Handler: 

    Exit Sub 

Err_Handler: 

    clsErrorHandler.HandleError Me.Name, Me.ActiveControl.Name 

    Resume Exit_Handler 

End Sub
Microsoft 365 and Office | Access | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Duane Hookom 26,825 Reputation points Volunteer Moderator
    2023-08-17T00:44:39+00:00

    Can you edit any field in the record? Can you edit the Active field itself? Does the record have the focus prior to clicking the button?

    Not sure if it makes a difference but I would use:

    Me.[Active] = False
    

    Was this answer helpful?

    0 comments No comments