Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

Set the a differet value of a textbox based on input value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John - 20 May 2007 06:25 GMT
Hello to everybody.
In a textbox I shoult type the value from 1 to 9 in the following way: 01,
02, 03, 04, 05, etc
However may times I type only one digit: 1, 2, 4, 5, etc.
Is there a way to get always as result 01, 02, 03.
This way will help me a lot during the report sorted out by column

Thanks for your help and regards
John
fredg - 20 May 2007 07:37 GMT
> Hello to everybody.
> In a textbox I shoult type the value from 1 to 9 in the following way: 01,
[quoted text clipped - 5 lines]
> Thanks for your help and regards
> John

Make the field a Text datatype field.
Signature

Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

missinglinq - 20 May 2007 11:25 GMT
As Fred wrote, make the field a Text datatype field, then:

Private Sub YourFieldName_Exit(Cancel As Integer)
 If Len(Me.YourFieldName) < 2 Then
   Me.YourFieldName = "0" & Me.YourFieldName
 End If
End Sub
John - 22 May 2007 22:20 GMT
Many thanks for your help. It's what I am looking for.

Regards
John
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.