hey guys,
I would like to create a loop where, if the user does't enter the right format i want to display a message showing the date format and would like to give user a chance to re-enter the dates..The code i wrote is as follows:
This code doesn't allow the user to re-enter the information it jus loops..
How do i give user the control to allow them to re-enter the dates..and then check again to make sure the dates were right, also is the Do..while loop the best way to do this?
Thanks for any help in advance,
I would like to create a loop where, if the user does't enter the right format i want to display a message showing the date format and would like to give user a chance to re-enter the dates..The code i wrote is as follows:
Code:
Do
MsgBox "Please enter the date format as MM/DD/YY, in both boxes"
Loop While (Format(Me.txtStartDate <> "MMDDYY") Or Format(Me.txtEndDate <> "MMDDYY"))
This code doesn't allow the user to re-enter the information it jus loops..
How do i give user the control to allow them to re-enter the dates..and then check again to make sure the dates were right, also is the Do..while loop the best way to do this?
Thanks for any help in advance,