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  dBforums > PC based Database Applications > Microsoft Access > Textbox update problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-04-12, 07:02
DavidKi DavidKi is offline
Registered User
 
Join Date: Jan 2012
Posts: 7
Question Textbox update problem

Good morning,

When I enter a value into text box and click Go button I get Msgbox saying that the value is null. However, when I enter a value, press enter and click Go button Msgbox displays it correctly.

Is there a way to avoid pressing enter to register a value in textbox?

Thank you.
Reply With Quote
  #2 (permalink)  
Old 01-04-12, 08:39
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
What you describe is rather unusual. With "Text0" being the name of the textbox, you can try :
Code:
Private Sub Text0_Change()

    Me.Text0.Value = Me.Text0.Text
    Me.Text0.SelStart = Len(Me.Text0.Value)
    
End Sub
__________________
Have a nice day!
Reply With Quote
  #3 (permalink)  
Old 01-04-12, 09:28
DavidKi DavidKi is offline
Registered User
 
Join Date: Jan 2012
Posts: 7
Thumbs up

I did txtPassword.Value = txtPassword.Text on button click event and it works perfectly.

Thanks Sinndho!
Reply With Quote
  #4 (permalink)  
Old 01-04-12, 10:31
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
You're welcome!
__________________
Have a nice day!
Reply With Quote
  #5 (permalink)  
Old 01-04-12, 14:11
DavidKi DavidKi is offline
Registered User
 
Join Date: Jan 2012
Posts: 7
Question

Thanks again.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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