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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |