I know this is pretty much simple but my brain is jammed and I cannot really make any progress with this.
Can someone assist me with this problem?
Ok it’s to do with validation for Overtime during working days and weekend only:
I have 3 text boxes
1. TimeIn
2. TimeOut
3. DateWorked
And 3 command buttons that are disable by default:
1. cmdNew ‘On click goes to new record
2. cmdclockin ‘inserts time into TimeOut -clock out
3. cmdclockout ‘inserts date into DateWorked and time into TimeIn –clockin
On the On_Current event of the form I wish to control how these buttons are enable and disable triggered by each particular event.
Ok when a user clicks on cmdclockin to clock in, Date() and Time is inserted into DateWorked and TimeIn respectively.
I am confronted with so many if conditions and am stacked on how to logically arrange them so that they work perfectly as I wish.
This is what I would like to do:
1.If DateWorked<>dat e or IsNull(DateWork ed)=True then
cmdNew.Enable=T rue
2. If IsNull(TimeIn)= True and IsNull(TimeOut )=False then
cmdclockout.Ena ble=True
cmdclockin.Enab le=False
3. If IsNull(DateWork ed)=True Then
cmdclockout.Ena ble= True
cmdclockin.Enab le= False
4 If IsNull(DateWork ed)=False And IsNull(TimeOut) =True Then
cmdclockout.Ena ble= False
cmdclockin.Enab le= True
5. if Time<#4:06pm # then ‘they need to clock in after 4:06 pm
cmdNew.Enable=F alse 'Ready to Go to new record if clicked
else
cmdNew.Enable=T rue
I know most people will figure out the logic. The problem is that I just need to logically put these so that it works.
Thanks so much. It’s quite easy but my mind is not really fresh at this point of time because of a kind of pressure am going through and I cannot think logically at this time. So please help me out.
If anyone think that I am missing some important component do include in the solution or ask.
Thank you and thank you
Jerry
Can someone assist me with this problem?
Ok it’s to do with validation for Overtime during working days and weekend only:
I have 3 text boxes
1. TimeIn
2. TimeOut
3. DateWorked
And 3 command buttons that are disable by default:
1. cmdNew ‘On click goes to new record
2. cmdclockin ‘inserts time into TimeOut -clock out
3. cmdclockout ‘inserts date into DateWorked and time into TimeIn –clockin
On the On_Current event of the form I wish to control how these buttons are enable and disable triggered by each particular event.
Ok when a user clicks on cmdclockin to clock in, Date() and Time is inserted into DateWorked and TimeIn respectively.
I am confronted with so many if conditions and am stacked on how to logically arrange them so that they work perfectly as I wish.
This is what I would like to do:
1.If DateWorked<>dat e or IsNull(DateWork ed)=True then
cmdNew.Enable=T rue
2. If IsNull(TimeIn)= True and IsNull(TimeOut )=False then
cmdclockout.Ena ble=True
cmdclockin.Enab le=False
3. If IsNull(DateWork ed)=True Then
cmdclockout.Ena ble= True
cmdclockin.Enab le= False
4 If IsNull(DateWork ed)=False And IsNull(TimeOut) =True Then
cmdclockout.Ena ble= False
cmdclockin.Enab le= True
5. if Time<#4:06pm # then ‘they need to clock in after 4:06 pm
cmdNew.Enable=F alse 'Ready to Go to new record if clicked
else
cmdNew.Enable=T rue
I know most people will figure out the logic. The problem is that I just need to logically put these so that it works.
Thanks so much. It’s quite easy but my mind is not really fresh at this point of time because of a kind of pressure am going through and I cannot think logically at this time. So please help me out.
If anyone think that I am missing some important component do include in the solution or ask.
Thank you and thank you
Jerry
Comment