title: MS-Access hidding and showing a button conditionally through vba
body: <p>I am developing a quality control system for my company, and I i want to connect it to a label printer, which is already taken care off, the problem now is with the button itself.</p>
  
  <p>I want the print label button to only be enabled and visible after the whole check was made, what i've got now is this:</p>
  
  <pre><code>Private Sub Form_BeforeUpdate(Cancel As Integer)
  
  Button_label.Visible = False
  Button_label.Enabled = False
  
  End Sub
  
  Private Sub Motor_OK_Change()
  
  Dim ok As Boolean
  ok = Motor_OK.Value
  
  
  If ok = 1 Then
  Button_label.Visible = True
  Button_label.Enabled = True
  
  End If
  
  
  End Sub
  </code></pre>
  
  <p>It does work on conceiling the button, but it fails when trying to enable it again and making it visible upon making the check. It's important to refer that I have tried using <code>If ok = True</code> instead of <code>If ok= 1</code>, I dont know how important that is.</p>
  
  <p>Thanks</p>