Try<div><br></div><div>Application.ActiveForm.ActiveControl</div><div><br></div><div>Cheers,</div><div>Colin<br><br><div class="gmail_quote">On 6 June 2011 13:12, Marshland Engineering <span dir="ltr"><<a href="mailto:marshland@marshland.co.nz">marshland@marshland.co.nz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#ffffff">
<div><font size="2" face="Arial">After a bit of experimenting, it seems that the
OnValidate is triggered once you leave the dbEdit box and it is before the Post
is committed. This means that you get a message directly after the box you
have just entered the data into. </font></div>
<div> </div>
<div><font size="2" face="Arial">This words great for data validation across many
forms, but, it tells you the error, however it does not does not return you
the box you have just left. Is there a way to put the cursor back to the
dbEdit box if an error is encountered ?</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">Along a similar line, is there a way to find where
the cursor is within a string in and edit box ?</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">Thanks Wallace</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial"></font> </div></div>
<br>_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br></blockquote></div><br></div>