I only want this code to work if there is no value within the text box. It works fine when the textbox is empty and ignors the code as expected if I click on something else after adding a date and then click back into the textbox.
My problem is the textbox has no value if the user is currently typing something in for the first time. If the user is currently typing a date and wants to click on another part of the date to correct it the cursor is positioned at the front regardless of where the user clicked. Following is the code i'm using in the ON_CLICK event, any help would be appreciated.
Expand|Select|Wrap|Line Numbers
- If IIf(IsNull(Me.ActiveControl), "", Trim(Me.ActiveControl)) = "" Then
- Me.ActiveControl.SelStart = 0
- End If