|
-
Oct 11th, 2000, 03:23 PM
#1
Thread Starter
New Member
I have two issues concerning a textbox.
Issue 1:
A user can populate a text box with a date value from a calander control by double clicking the textbox (or manualy type in the date). If the textbox is double clicked, and a date is selected from the calander control, part of the date is hi-lighted. The hi-lighed portion could be either the year, the month, the day, or the slash. This requires the user to have to click twice on a control inorder to either set focus on the control or to call the control's click event. Any suggestions?
Issue 2:
I am also using the textbox's AfterUpdate Event to call a date checking subroutine. This routine verifies the date and prompts the user to enter a valid date if necessary. However, I can not use the textbox's setfocus event to set focus to the text box. Here's the error checking subroutine I am using:
Public Sub subCheckDate()
If IsDate(TextBox1.Text) = False And _
UCase(TextBox1.Text) <> UCase("present") Then
MsgBox "Date must be in MM/DD/YYYY format" _
& Chr(13) & "or state 'PRESENT'", vbExclamation, "Invalid Date"
MsgBox strCtrlName
'Set focus to Textbox so User can reinput date
TextBox1.SetFocus
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|