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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Default_Value



 
 
Thread Tools Display Modes
  #1  
Old December 2nd, 2009, 11:02 AM posted to microsoft.public.access.forms
ashraf_al_ani via AccessMonster.com
external usenet poster
 
Posts: 14
Default Default_Value

Dear All

How Can I Change The Default Value For a text value
(when i enter the value in the text ,that text will keep the value as a
default value and when i change this value that text will change the default
value to the new value)

waiting your response

best regards

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200912/1

  #2  
Old December 2nd, 2009, 11:20 AM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Default_Value

Try the following in the control's AfterUpdate event:

Private Sub MyTextbox_AfterUpdate()

Me!MyTextbox.DefaultValue = Chr(34) & Me!MyTextbox & Chr(34)

End Sub

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"ashraf_al_ani via AccessMonster.com" u54845@uwe wrote in message
news:9ffb9247f537b@uwe...
Dear All

How Can I Change The Default Value For a text value
(when i enter the value in the text ,that text will keep the value as a
default value and when i change this value that text will change the
default
value to the new value)

waiting your response

best regards

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200912/1



  #3  
Old December 2nd, 2009, 11:20 AM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Default_Value

Try the following in the control's AfterUpdate event:

Private Sub MyTextbox_AfterUpdate()

Me!MyTextbox.DefaultValue = Chr(34) & Me!MyTextbox & Chr(34)

End Sub

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"ashraf_al_ani via AccessMonster.com" u54845@uwe wrote in message
news:9ffb9247f537b@uwe...
Dear All

How Can I Change The Default Value For a text value
(when i enter the value in the text ,that text will keep the value as a
default value and when i change this value that text will change the
default
value to the new value)

waiting your response

best regards

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200912/1



  #4  
Old December 2nd, 2009, 11:20 AM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Default_Value

Try the following in the control's AfterUpdate event:

Private Sub MyTextbox_AfterUpdate()

Me!MyTextbox.DefaultValue = Chr(34) & Me!MyTextbox & Chr(34)

End Sub

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"ashraf_al_ani via AccessMonster.com" u54845@uwe wrote in message
news:9ffb9247f537b@uwe...
Dear All

How Can I Change The Default Value For a text value
(when i enter the value in the text ,that text will keep the value as a
default value and when i change this value that text will change the
default
value to the new value)

waiting your response

best regards

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200912/1



  #5  
Old December 3rd, 2009, 05:10 AM posted to microsoft.public.access.forms
ashraf_al_ani via AccessMonster.com
external usenet poster
 
Posts: 14
Default Default_Value

Dear Douglas

thanks for your help

but the code didnt work with me
pls any any example or idea how to solve this problem

best regards

Douglas J. Steele wrote:
Try the following in the control's AfterUpdate event:

Private Sub MyTextbox_AfterUpdate()

Me!MyTextbox.DefaultValue = Chr(34) & Me!MyTextbox & Chr(34)

End Sub

Dear All

[quoted text clipped - 7 lines]

best regards


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200912/1

  #6  
Old December 3rd, 2009, 01:59 PM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Default_Value

Hmm. It works fine for me.

At the risk of insulting you, did you use it correctly?

You need to:

1) Look at the Properties associated with your text box, and find the
AfterUpdate property.
2) Set the AfterUpdate property to [Event Procedure], then click on the
ellipsis (...) to the right of the property.
3) That will take you into the VB Editor, in the middle of code like

Private Sub MyTextbox_AfterUpdate()

End Sub

(NOTE: "MyTextbox" will be replaced by whatever the name of your text box
is)

4) Type the one line of code into that routine, so that you have what I
originally suggested

(NOTE: Make sure you replace "MyTextbox" with the actual name of your text
box in all places)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"ashraf_al_ani via AccessMonster.com" u54845@uwe wrote in message
news:a005123108e09@uwe...
Dear Douglas

thanks for your help

but the code didnt work with me
pls any any example or idea how to solve this problem

best regards

Douglas J. Steele wrote:
Try the following in the control's AfterUpdate event:

Private Sub MyTextbox_AfterUpdate()

Me!MyTextbox.DefaultValue = Chr(34) & Me!MyTextbox & Chr(34)

End Sub

Dear All

[quoted text clipped - 7 lines]

best regards


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200912/1



 




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


All times are GMT +1. The time now is 05:38 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.