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 / Modules / DAO / VBA / April 2007

Tip: Looking for answers? Try searching our database.

Concatination/Zero fill

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vtj - 20 Apr 2007 22:24 GMT
I am using Access 2000.  I’m using VBA code in a module.  Is there an
equivelant to 'string2 =  Right(Space(4) & [rst1]![orgn], 4)’ that would fill
with zeros instead of spaces?  Thank you for your help.
John Spencer - 20 Apr 2007 23:56 GMT
Right("0000" & rst1!Orgn,4)

or

Right(String(4,"0") & rst1!Orgn,4)

'====================================================
 John Spencer
 Access MVP 2002-2005, 2007
 Center for Health Program Development and Management
 University of Maryland Baltimore County
'====================================================

> I am using Access 2000.  I’m using VBA code in a module.  Is there an
> equivelant to 'string2 =  Right(Space(4) & [rst1]![orgn], 4)’ that would fill
> with zeros instead of spaces?  Thank you for your help.
 
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.