more date format questions - caht change month/day only.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have another question about dates. I modified the date mask format in form
to 99/99/9. It works okay, except when somebody wants to change the value.
When they change a value ( which is now a 99/99/9999 value ) , they get an
error because the format should be 99/99/9 not 99/99/9999. How do I fix it
so they can change only the day ? It seems like I should be able to edit it
with a formatted value with no problems. Any suggestions?
 
Hello,

Per your question, you may want to temporarily change the inputmask to
"99/99/0000" if there is already exist date in the field, then change it
back when exiting. This seems to work fine.

Private Sub duedate_Enter()
If (Me.duedate.Text <> "") Then

Me.duedate.InputMask = "99/99/0000"

End If
End Sub


Private Sub duedate_Exit(Cancel As Integer)
Me.duedate.InputMask = "99/99/00"
End Sub

Please let's know if this meet your requirement. Thank you.

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
<http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
<http://msdn.microsoft.com/subscriptions/support/default.aspx>.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top