By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,214 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

Validation problem with calendar control.

P: n/a
Hi

I have two unbounded text boxes (startdate and enddate). If I
entered the date manually
I can can set validation for the text box for example
[startdate] < date()
this will works but if I have a calendar control populating the
date automaticcaly. It will
bypass the validation. I try this for validation but does
not
cdate([startdate]) < date()

I try to set code for after update event but it does not do
anything. Somehow the
calendar control bypass the validation event as well before
and after update event.

Apr 13 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
The AfterUpdate event fires only when you change the control value manually,
not when it is changed through code. You will either need the code that
places the value in the textbox to do the validation (preferable) or you
could do the validation in the textbox's Exit event. If you have the code
that places the value in the textbox do the validation, you may simply be
able to tell it to call the textbox's AfterUpdate event in stead of
rewriting the validation code.

--
Wayne Morgan
MS Access MVP
"Cong" <co*****@yahoo.com> wrote in message
news:11*********************@i39g2000cwa.googlegro ups.com...
Hi

I have two unbounded text boxes (startdate and enddate). If I
entered the date manually
I can can set validation for the text box for example
[startdate] < date()
this will works but if I have a calendar control populating the
date automaticcaly. It will
bypass the validation. I try this for validation but does
not
cdate([startdate]) < date()

I try to set code for after update event but it does not do
anything. Somehow the
calendar control bypass the validation event as well before
and after update event.

Apr 14 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.