PC Review


Reply
Thread Tools Rate Thread

Revert back to Default Value

 
 
jas580
Guest
Posts: n/a
 
      13th May 2009
Hello,

On a form, I have an unbound text box with a default value of 2. While in
form view, I can change the value of the text box. Now I want to create a
button on the form that, when clicked, will change the text box value back to
its default. Thanks for the help...

-jeff
 
Reply With Quote
 
 
 
 
KLZA
Guest
Posts: n/a
 
      13th May 2009
On May 13, 4:03*pm, jas580 <(E-Mail Removed)> wrote:
> Hello,
>
> On a form, I have an unbound text box with a default value of 2. *Whilein
> form view, I can change the value of the text box. *Now I want to create a
> button on the form that, when clicked, will change the text box value back to
> its default. *Thanks for the help...
>
> -jeff


use onclick event..Assuming your unbound text box is calle text0 and
button is called command2 use the follwing code.

Private Sub Command2_Click()
Text0 = 2
End Sub
 
Reply With Quote
 
 
 
 
sfisher973
Guest
Posts: n/a
 
      13th May 2009
A little more generic...

Private Sub Command2_Click()
Text0 = Text0.default
End Sub

--
-Steve


"KLZA" wrote:

> On May 13, 4:03 pm, jas580 <(E-Mail Removed)> wrote:
> > Hello,
> >
> > On a form, I have an unbound text box with a default value of 2. While in
> > form view, I can change the value of the text box. Now I want to create a
> > button on the form that, when clicked, will change the text box value back to
> > its default. Thanks for the help...
> >
> > -jeff

>
> use onclick event..Assuming your unbound text box is calle text0 and
> button is called command2 use the follwing code.
>
> Private Sub Command2_Click()
> Text0 = 2
> End Sub
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Icons revert back to default style Yada Yada Windows XP Security 0 18th Aug 2004 07:17 AM
Guest Account question (revert back to default or orginal settings) *ProteanThread* Windows XP Help 0 9th May 2004 10:36 PM
Folder Details Revert Back To Default Bik Windows XP General 4 28th Feb 2004 04:16 PM
Windows Revert Back To Default Views =?Utf-8?B?c2hhbmVtZWNv?= Windows XP Help 0 9th Jan 2004 03:16 AM
Display settings revert back to Default upon bootup Curt Windows XP Performance 0 22nd Jul 2003 03:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:24 AM.