Hi Klee,
When you ask about clearing a text field - are you referring to just 1 or 2
fields or to basically start with a "fresh, clean" form?
In regard to using a button to go to the top of the form - you can use the
"SelectText" method to accomplish this:
Here are a couple of examples of how you would do this depending on whether
your form is based on a database or not:
- If your form is based on a database (i.e. the Orders table from the
Northwind sample database) you would use code on the button similar to the
following:
'NOTE: This is VBScript
Dim objOrderID
Set objOrderID =
XDocument.DOM.selectSingleNode("//dfs:myFields/dfs:dataFields/d:Orders/@Orde
rID")
XDocument.View.SelectText objOrderID
- If you built your form simply by placing various controls on your form,
then you would have code similar to the following (this assumes there is a
field on your form named: field1)
'NOTE: This is VBScript
Dim objField1
Set objField1 = XDocument.DOM.selectSingleNode("//my:myFields/my:field1")
XDocument.View.SelectText objField1
I hope this helps!
Scott L. Heim
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.