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

Reset Controls on Form

Status
Not open for further replies.

VTbigwillie

Programmer
Jul 23, 2002
9
US
Is there a way to reset all of the values on a form without setting the focus on each of the controls?

Along a similiar line, is there a way to check all of the controls to make sure data is in them w/o setting the focus?

Thanks in advance,
Will
 
Me.Undo will reset all values

Me.Dirty only checks that there has been a single value modified from the new record

As far as I know there is no way to check that each control has a value by using intrinsic functions. It would be very easy to write a routine such as:

Public Function DoAllControlsHaveData() As Boolean

Dim bYes As Boolean
bYes = (Len(Me.txtVal)) > 0)
bYes = (Len(Me.txtVal2)) > 0
...
DoAllControlsHaveData = bYes

End Function ----------------------
scking@arinc.com
Life is filled with lessons.
We are responsible for the
results of the quizzes.
-----------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top