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

Add Record

Status
Not open for further replies.

rumples

Technical User
Sep 6, 2004
5
US
How do you clear a form after adding a record? I tried this and it adds the recorde but does not clear the form.
Thanks

Private Sun btnComplete_Click()

DoCmd.GoToRecord , , acNewRecord
DoCmdClose
End Sub

 
Hi Rumples,

Draknor39 had this answer to another post (thread705-786100)
Code:
Dim ctl As Control
For Each ctl In Me.Controls
        If (ctl.ControlType = acTextBox) Then
            ctl.Value = Null
        End If
Next ctl
Hope this helps...

Simon

"A picture is not worth a 1000 words on the Internet. The information is in the text."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top