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!

Clean out the unbound controls to enter a new record...easy way?

Status
Not open for further replies.

gusbrunston

Programmer
Feb 27, 2001
1,234
US
Hi.

There are ten unbound controls on a check entry form to display confirming information to the user. The unbound controls retain the previous data when the form displays the new record for input.

Is there an easy way to sweep the leftover data out of the text boxes?

If I must do it one by one, which form event would be best? On Current? Before Update?

Many thanks in advance.

I've had a really good day! Gus Brunston :cool: An old PICKer, using Access2000
padregus@attbi.com

 
Attach this code to your form then call it on an event...

Private Sub ResetUnbound()

Dim conControl As Control

For Each conControl In Me.Controls
If conControl.Properties("ControlSource") = "" Then
conControl = ""
End If
Next conControl

End Sub
 

Hi, and thanks for the info. I've been out a couple of days and haven't had a chance to try it, but it's so logical.

I'm really optamystik about Pezamystik! Gus Brunston :cool: An old PICKer, using Access2000. Celebrating this year my 72nd birthday and my 50th wedding anniversary.
padregus@attbi.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top