How do I auto fill blanks in a text box of a data entry form

J

jerry

I have a text box named ID which has 16 digital numbers. How can I add 0000000
automatically to the end of text I have entered?
For example, when I enter 123456789, it will show me 1234567890000000.
Thanks!
 
J

John Vinson

I have a text box named ID which has 16 digital numbers. How can I add 0000000
automatically to the end of text I have entered?
For example, when I enter 123456789, it will show me 1234567890000000.
Thanks!

Use the Code Builder by clicking the ... icon on the textbox's
AfterInsert event. Edit the code to something like

Private Sub textboxname_AfterInsert()
Me!textboxname = Me!textboxname & "0000000"
End Sub

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
J

jerry

Got it !
Thank you so much!!!

John Vinson said:
Use the Code Builder by clicking the ... icon on the textbox's
AfterInsert event. Edit the code to something like

Private Sub textboxname_AfterInsert()
Me!textboxname = Me!textboxname & "0000000"
End Sub

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Top