|
-
February 28th, 2000, 12:09 PM
#1
Clear Feilds
How can I clear all the fealds on a form if the
feilds are linked to a Data Base
Thanks in Advance
Donny S.
-
February 28th, 2000, 12:44 PM
#2
Re: Clear Feilds
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
-
February 28th, 2000, 01:24 PM
#3
Re: Clear Feilds
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
John Pirkey
MCSD (VB6)
http://www.stlvbug.org
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|