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!

Clearing fields in a record 1

Status
Not open for further replies.

NWTrust

Technical User
Apr 2, 2002
68
GB
I want to be able to clear all fields in a record displayed in a form, ready for insertion of new data. Deleting the record is not possible as the record is linked to a record in another table and I wish to retain the link. I know I can do it by deleting each individual field but as there are over a dozen fields I'm hoping there is a quick and easy way of achieving this. Any help would be greatly appreciated.
 
Something like this?
Code:
Dim ctl As Control
For Each ctl in Me
    If ctl.Type = acTextBox Then
        ctl.Value = ""
    End If
Next ctl


Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top