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

validate data before movenext trigger on bound control

Status
Not open for further replies.

PeterMac

Programmer
Mar 9, 2001
51
CA
Hello:

I am trying to validate my data before I allow the move to happen on bound controls using an ADO control. I figured it would be in the data control's validate event, but if I put code in that event the record pointer moves anyway.

On an related topic... is there any way to load unbound controls with a record set during the form load event so that the data is there in the controls when the form is opened?

Any help appreciated.

Cheers,
Petermac
 
1. Use the validate event on the bound control.

2. Yes - get your recordset in FormLoad and set control values from recordset as normal. Don't forget FormLoad is fired on Load or first reference to the form in code elsewhere. It is not refired when changing focus from form to form and back again. For that use the Activate event
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top