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

Cancell Update event

Status
Not open for further replies.

TruthAndBeauty

Technical User
Jun 4, 2001
38
US
Hi folks.

Scenario:
Continuous form.
Each record has one editible field, a date field bound to a table. The user enters a invalide entry into record #1 and immeidately clicks on the entry field on record #2.
-------------------------------------------------------------------------------------------
Validation (psuedo code) :
entry can be blank (null) or
if IsDate(entry) and [entry] between date1 and date2 then
update (save entry)
else
error message,
cancel save,
put/leave cursor on the record/field that failed validation
End

I couldn't place all the validation on the Validation property and then make it work. I put the validation in the Befroe Update event but I don't know how to cancel the Update event from saving if the vlaidation failed. It's important that the cursor remains or is returned to the invalid entry control.

I suspect there is a very easy way to do this and I've lost my way. Suggestions? Thanks.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top