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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Issues - any assistance is appreciated

Status
Not open for further replies.

Geser

Programmer
Jul 19, 2005
4
US
I have a situation where the users are entering date through a field on a data window. I need to be able to (before the information is saved) check to make sure that the date is <= to today's date. I that's not the case, then I do not want users to be able to save the information they enter.

Thank you for any assistance!

Greg
 
Put your validation in the itemchanged event on the datawindow where the dwo.name = <your column name>. Return 1 if the data is not valid.

Matt

"Nature forges everything on the anvil of time
 
If you want to make sure your validation always occurs, you might want to consider putting the validation in a c function. Then you can call call the function from both itemchanged and before the data is saved. That way if the user enters data and goes directly to the save icon (for example), you'll be sure the validation is performed.

ItemChanged is not always triggered if the user goes from the datawindow directly to a menu item (at least that's been my experience).
 
Use the accepttext method on the dw (see PB help for more info) to ensure the itemchanged validation occurs. No need for a c function.

Matt

"Nature forges everything on the anvil of time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top