A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Clearing all the entries from form when



 
 
Thread Tools Display Modes
  #1  
Old February 28th, 2006, 06:44 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Clearing all the entries from form when

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-


  #2  
Old February 28th, 2006, 07:07 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Clearing all the entries from form when

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

"elli" wrote:

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-



  #3  
Old February 28th, 2006, 08:27 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Clearing all the entries from form when

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" kirjoitti
...
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

"elli" wrote:

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-





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Controls disappear from Data Entry form Paul Ponzelli Using Forms 10 February 26th, 2006 05:51 AM
Move feild entries from form to form using global variables JackCGW General Discussion 11 November 14th, 2005 05:22 AM
Need to clear controls of Filter form Jan Il Using Forms 2 November 28th, 2004 02:04 PM
dlookup miaplacidus Using Forms 9 August 5th, 2004 09:16 PM
auto entry into second table after update Tony New Users 13 July 9th, 2004 10:42 PM


All times are GMT +1. The time now is 06:21 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.