Calendar and date validation problem

L

Liz

I would appreciate any help you could give me. I am
working with Office XP, but am saving it as Access 2000.
I am fairly inexperienced with Access. I do ok, but
nothing remarkable.

I had problems with Access's calendars so I downloaded
one that works great. The only problem is this:

1) I have two dates (textboxes). One date MUST come
before the other one. I have coded so that a warning
pops up and says that this one date must occur before
this other date and the entry operator should re-enter
data. When I manually enter the dates (using a short
date input mask) the validation rule works. However,
when I use the calendar to insert the dates, it does not
work and lets the user tab on through with errors!

Any idea what could be the problem?

Please help!

Liz
 
B

Bill

Validate using the beforeupdate event of date control 2 with this code:
Assume Date control names FromDate, ToDate
If FromDate >= ToDate Then
MsgBox("Date Must be Greater than From Date"), vbOKOnly
Cancel = true
End If
 
L

Liz

Thanks, Bill, I'll give it a try!
-----Original Message-----
Validate using the beforeupdate event of date control 2 with this code:
Assume Date control names FromDate, ToDate
If FromDate >= ToDate Then
MsgBox("Date Must be Greater than From Date"), vbOKOnly
Cancel = true
End If



.
 
L

Liz

Unfortunately, it's still not working. I am using a
calendar from a website that uses InputDateField
(www.glump.net/content/AccessDatePicker). I believe this
calendar does not use ActiveX. I have tried anything I
can imagine to validate the date fields, but it's still
not working when using the calendar. I have contacted
the person who wrote the code and am awaiting an answer
but time is of the essence, so I thought if anyone else
could think of something, that would be great.

HELP!!!!!!!!!!!!

Thanks!
 

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

Top