Connecting Tech Pros Worldwide Help | Site Map

Validation problem with calendar control.

 
LinkBack Thread Tools Search this Thread
  #1  
Old April 13th, 2006, 11:25 PM
Cong
Guest
 
Posts: n/a
Default Validation problem with calendar control.

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.


  #2  
Old April 14th, 2006, 12:35 AM
Wayne Morgan
Guest
 
Posts: n/a
Default Re: Validation problem with calendar control.

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" <congngo@yahoo.com> wrote in message
news:1144969832.385322.57370@i39g2000cwa.googlegro ups.com...[color=blue]
> 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.
>[/color]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.