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 / June 2005

Tip: Looking for answers? Try searching our database.

Combo Box Question with Spaces

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Markus - 16 Jun 2005 18:14 GMT
Hallo

I have the following problem with a combo box where it cuts of spaces at the
end of the text example

(    1N1G-     6007-BB      ) This is how it should be the field length is
always the same so where there is no characters it must give me a blank space
in the front and the middle its ok just at the end it cuts them off how can I
prevent that from happening its very important that they are there because in
your company tables if there is not character there is a blank space and if I
don't give indicate it in my query that there is blank spaces it does not work

I hope some one can help

Markus
Klatuu - 16 Jun 2005 23:01 GMT
Regardless of the defined length of a field, it only stores the actual length
of the data entered.  This will include leading and embedded spaces, but not
trailing spaces.  If you need to have trailing spaces displayed, then you
will have to pad it with spaces:

x= space(desiredlength - len(x))

> Hallo
>
[quoted text clipped - 11 lines]
>
> Markus
Klatuu - 16 Jun 2005 23:01 GMT
Regardless of the defined length of a field, it only stores the length of the
data entered.  This includes leading and embedded spaces and excludes
trailing spaces.  If you want to display the spaces:

MyString = MyString & Space(DesiredLength - Len(MyString))

> Hallo
>
[quoted text clipped - 11 lines]
>
> Markus
Klatuu - 16 Jun 2005 23:28 GMT
Regardless of the defined length of a field, it only stores the actual lenght
of the data entered.  This included leading and embedded spaces but excludes
trailing spaces.  To display the length you want:

MyString = MyString & Space(DesiredLength - Len(MyString))

> Hallo
>
[quoted text clipped - 11 lines]
>
> Markus
 
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.