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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top