count down and disable a date field 
Author Message
 count down and disable a date field

I have a field called txtExpirationDate which is set to
Date() set with a command button cmdSalePending. I want to
have it "reset" itself to zero-length once the Date()=the
present date. i have tried

If txtExpirationDate=>Date() Then
txtExpirationDate=""

it's not working. can anyone help?
Thanks!
MaryAnn



Sat, 17 Jul 2004 01:03:03 GMT  
 count down and disable a date field
What might be happening is, the text you've entered on the
form (or that is appearing on the form) is being
interpreted as Text/String. I recommend:

If DateValue(txtExpirationDate) <= Date Then
     txtExpirationDate = ""
End If

Quote:
>-----Original Message-----
>I have a field called txtExpirationDate which is set to
>Date() set with a command button cmdSalePending. I want
to
>have it "reset" itself to zero-length once the Date()=the
>present date. i have tried

>If txtExpirationDate=>Date() Then
>txtExpirationDate=""

>it's not working. can anyone help?
>Thanks!
>MaryAnn
>.



Sat, 17 Jul 2004 06:21:02 GMT  
 count down and disable a date field


Quote:
>I have a field called txtExpirationDate which is set to
>Date() set with a command button cmdSalePending. I want to
>have it "reset" itself to zero-length once the Date()=the
>present date. i have tried

>If txtExpirationDate=>Date() Then
>txtExpirationDate=""

>it's not working. can anyone help?

Is the table field behind this textbox a Text field, or a Date/Time
field? If it's Date/Time, you should set it to NULL; "" is a text
string, and a Date/Time is *NOT* a Text string, it's a double float
number.

                  John W. Vinson[MVP]    
    Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public



Sat, 17 Jul 2004 07:31:38 GMT  
 count down and disable a date field
Try setting the control to null.

If txtExpirationDate=>Date() Then
   txtExpirationDate = Null

Quote:

> I have a field called txtExpirationDate which is set to
> Date() set with a command button cmdSalePending. I want to
> have it "reset" itself to zero-length once the Date()=the
> present date. i have tried

> If txtExpirationDate=>Date() Then
> txtExpirationDate=""

> it's not working. can anyone help?
> Thanks!
> MaryAnn

--
John Spencer
MS Access MVP
UMBC-CHPDM


Sat, 17 Jul 2004 07:51:11 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Get date count between two date

2. count down clock

3. count down

4. Createing a count down timer and making required things in a text box

5. Loop counting minutes down

6. Count down timing help please

7. Count across the page rather than down

8. Count help- across not down

9. Year2000 count down VB5 sample.

10. How do you disable word counting?

11. Changing a Calculate field (Date) depending on Current date

12. Extracting the date out of a Date/Time field

 

 
Powered by phpBB® Forum Software