Morning all!
Question from a novice I'm afraid.
I have a simple form I am using for employees to "clock-in" and "clock-out" for their weekly timesheet.
When they select their name, the form shows them if they are currently "clocked-in" or "clocked-out".
If they are "clocked-in" I only want them to see the "clock-out" button and vice-versa.
I guess I can acheive this with the "Visible" parameter on the button control.
The bit I am struggling with is the coding.
I have very little experience of VBA and tend us macros to make up for this!
How do I write a few lines of VBA to do what I need?
I can call it from the "On Update" event when they have selected their user name - so it will then know if the person is "Clocked-in" or "clocked-out". But its the actual code that has me stumped!
At the moment I have:-
"Private Sub Command26_Click()
Me.ClockOut.Visible = No
End Sub"
attached to a seperate button for testing, but it doesn't work!
The form is called "ClockCard" and the button I'm trying to hide is called "ClockOut".
Please can someone point me in the write direction to get the simple test code working, then I can progress to the "If" functionality I need?
Many thanks
Matthew
Question from a novice I'm afraid.
I have a simple form I am using for employees to "clock-in" and "clock-out" for their weekly timesheet.
When they select their name, the form shows them if they are currently "clocked-in" or "clocked-out".
If they are "clocked-in" I only want them to see the "clock-out" button and vice-versa.
I guess I can acheive this with the "Visible" parameter on the button control.
The bit I am struggling with is the coding.
I have very little experience of VBA and tend us macros to make up for this!
How do I write a few lines of VBA to do what I need?
I can call it from the "On Update" event when they have selected their user name - so it will then know if the person is "Clocked-in" or "clocked-out". But its the actual code that has me stumped!
At the moment I have:-
"Private Sub Command26_Click()
Me.ClockOut.Visible = No
End Sub"
attached to a seperate button for testing, but it doesn't work!
The form is called "ClockCard" and the button I'm trying to hide is called "ClockOut".
Please can someone point me in the write direction to get the simple test code working, then I can progress to the "If" functionality I need?
Many thanks
Matthew