I would like to have a control on a form (command button) change its visibility depending on a value in a text field in that record. Specifically, if a RegNumb has not been assigned to a record, then I want a command button to appear that will increment the maximum value of RegNumb in the table by 1 and assign it to that record. I have the button that does the incrementing working with this code
Private Sub cmdRegNumb_Click()
[RegNumb] = (txtMaxRegNumb) + 1
End Sub
but I want to change its visibility with something like this:
If ([RegNumb] = Null) Then
cmdRegNumb.Visible = True
Else
cmdRegNumb.Visible = False
End If
Is this a possible thing to do?



