0

I have three text boxes. (1) Start time | (2) End Time | (3) Shift - Read Only
I want to automatically set the value of txtShift to DAY or NIGHT only depending on txtStart and txtEnd.

Am not requesting of a specific/perfect code for this problem, just want you guys to help me out on how should i solve this.

Please help. Thank you in advance.

2
Contributors
2
Replies
25
Views
2 Years
Discussion Span
Last Post by kayecng
0

Generically it would be

If SOME CONDITION Then
    txtShift.Text = "DAY"
Else
    txtShift.Text = "NIGHT"
End If

I can't be more specific than that because I don't know what range of values defines DAY or NIGHT. If there are a restricted set of possible values then you would be better off using a drop down list to select the values. Can you provide more info?

0

Shift Range: Start Time ~ End Time

DAY -- 0800H ~ 2000H
NIGHT -- 2000H ~ 0800H

User is allowed to input any time within the range.
Example:
[Start time] 13:20
[End Time] 14:25
Therefore, shift will be DAY

Do you recommend using drop down list for this case? or text box perhaps?
Thank you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.