How can I clear all the fealds on a form if the
feilds are linked to a Data Base
Thanks in Advance
Donny S.
Printable View
How can I clear all the fealds on a form if the
feilds are linked to a Data Base
Thanks in Advance
Donny S.
Try this:
private Sub Command1_Click()
Dim ctl as Control
for Each ctl In Form1.Controls
If TypeOf ctl is TextBox then
ctl.Text = ""
End If
next
End Sub
Vlad
You could also call the AddNew method of the data control you are using. That should clear all the linked controls and allow for new info to be entered. Then when you want to save that info, you would call the Update method of the data control.
HTH,
John
John Pirkey
MCSD
www.ShallowWaterSystems.com