Hi there, I have a Save REQUIRED fields button and when all required fields have been filled in, the Save REQUIRED fields button becomes enabled. I have created a DATE field so that when the button is pressed, it gives me a date and time when they pressed it.
Is there a way to disable this button once someone presses it?
Thank you for your assistance.
Set the YourButtonName.Enabled property to false at the end of the OnClick Sub after your Save and Date code. Just off the top of my head, you'll probably have to move the focus off the button before you disable it.
You could also use the .Visible property to hide the button. They can't click what they can't see! You also have to move focus away before you can set .Visible to false.
Edit: you can use the SomeOtherControl.SetFocus to move the focus away.
Note that you will need some method of re-enabling or re-showing the button, probably in the form's OnOpen event.
Jim