Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date verification using calendar selector 2

Status
Not open for further replies.

BabyPowder2u

Programmer
May 4, 2005
87
0
0
US
I am using ocxCalendar (MSCAL.Calendar.7) to pick dates. I would like to verify the date selected is >= current date.

Can someone help me accomplish this?

Thanks,

T
 
Well, that's what I'm trying to design. (I kind of asked what I wanted in a new post "Form design") I want the form to look the same with individual fields like this one. I figured on doing it the hard way, a select query and then filling the associated fields. (the 2 files would have a tracking # in common)
 
I did get the field to clear and not accept an invalid date. I added these lines into the If ... End if:

cboOriginator.Value = Null
cboOriginator.SetFocus
 
BabyPowder2u,

Sorry! The variable declaration was part of the original sub that I clipped this from, to demonstrate how to do this. That part wasn't germaine to your query, so I left it out of my post; just forgot to delete the Dim statement.

PHV

Yes, it is a safe habit is to enforce ALL validation rules in the Before_Update event procedure of the Form too. In fact, I now do this routinely, but didn't at the time I wrote the routine I pulled this from. Having said this, there are weekly MVPs on this site that have adressed this kind of problem using the After_Update routine! But I do now use the Before_Update sub. As I say in my signature tag, The is ALWAYS more than one way to skin a cat!

The Missinglinq



There's ALWAYS more than one way to skin a cat!
 
Hi Missingling,

Thanks for getting back. I wanted to make sure that "response" wasn't used as I see it in some of the "Access generated" proc's.

Thanks again for the help.

And, There are truly many ways to skin a cat. I accept suggestions, see if they can work in my situation, apply if it does & makes sense to me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top