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 / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

query results

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jkjmwilliams - 13 Jan 2008 20:11 GMT
How can I display only 4 digits in a number in a query when the original data
has 5. I am storing my numbers as text.

JoAnn
jkjmwilliams - 13 Jan 2008 20:16 GMT
This would also apply to how to show only the first letter (initial) of a
name. How to?

> How can I display only 4 digits in a number in a query when the original data
> has 5. I am storing my numbers as text.
>
> JoAnn
Dirk Goldgar - 13 Jan 2008 20:34 GMT
> This would also apply to how to show only the first letter (initial) of a
> name. How to?

For example,

   SELECT Left([FirstName, 1), LastName
   FROM MyTable

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

jkjmwilliams - 13 Jan 2008 21:06 GMT
Thanks, I tried it out, and it worked! You forgot to put the closing bracket
in, but I figured that part out. I just needed to know the right code.

> > This would also apply to how to show only the first letter (initial) of a
> > name. How to?
[quoted text clipped - 3 lines]
>     SELECT Left([FirstName, 1), LastName
>     FROM MyTable
Dirk Goldgar - 13 Jan 2008 22:25 GMT
> You forgot to put the closing bracket in

Oops!  Sorry about that.  I'm glad that didn't stop you.

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Dirk Goldgar - 13 Jan 2008 20:33 GMT
> How can I display only 4 digits in a number in a query when the original
> data
> has 5. I am storing my numbers as text.

Let your query select the expression,

   Left([YourNumberField], 4)

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 
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



©2009 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.