Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / February 2006

Tip: Looking for answers? Try searching our database.

Clearing all the entries from form when

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
elli - 28 Feb 2006 18:44 GMT
How do I get all the textboxes cleared when I leave the form or click the
button?

Tried almost anything and still the last username put to form stays on and
on....

-elli-
Ken Sheridan - 28 Feb 2006 19:07 GMT
Elli:

Presumably this is an unbound form.  Try this:

Dim ctrl As Control

' ignore error if control does not have Value property
OnError Resume Next
' loop through form's Controls collection and set each to Null
For Each ctrl In Me.Controls
   ctrl = Null
Next ctrl

Ken Sheridan
Stafford, England

> How do I get all the textboxes cleared when I leave the form or click the
> button?
[quoted text clipped - 3 lines]
>
> -elli-
elli - 28 Feb 2006 20:27 GMT
Hi Ken and thanks for a quick reply...
It is an anbound form and your piece of code seems to work allright.
Thank U!
Take care -elli-

"Ken Sheridan" <KenSheridan@discussions.microsoft.com> kirjoitti
viestissä:96CDABE4-30B9-4107-8DAA-A6CD0CDD406F@microsoft.com...
> Elli:
>
[quoted text clipped - 20 lines]
>>
>> -elli-
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.