Results 1 to 4 of 4
  1. #1
    Remster is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Sep 2010
    Posts
    317

    Format([TableName.FieldName],"s0")

    Folks



    A simply one, I hope.

    If I use Format([TableName.FieldName],"v0") in a query, I get the results I want: v1, v2, v3, etc. But if I use Format([TableName.FieldName],"s0"), I get this: 01, 02, 03, etc. How do I get s1, s2, s3, etc. instead?

    Thanks

    Remster

  2. #2
    goodguy is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Location
    Zanzibar, Tanzania
    Posts
    228
    It worked with both 's' and 'v' when I tested it.
    When I type 'v0', it is automatically set to '\v0'.

  3. #3
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Use

    Format([TableName].[FieldName],"\s0")


    The \ will force the s to be literal. I am guessing that there is some meaning to just the s being there with the 0 which causes the leading zero.

  4. #4
    Remster is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Sep 2010
    Posts
    317
    Ouch! Schoolboy error on my part. I was about to protest that I'd already tried "\s0", but I had my slash the wrong way round. Problem solved.

    I think "s" on its own might represent seconds, as in "hh:mm:ss".

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 16
    Last Post: 07-22-2011, 09:23 AM
  2. What format is "print to file" ?
    By degras in forum Reports
    Replies: 2
    Last Post: 03-24-2011, 03:47 AM
  3. "Unrecognized Database Format" After Using 2010
    By ajetrumpet in forum Code Repository
    Replies: 4
    Last Post: 03-21-2011, 11:59 PM
  4. Field "F1" does not exist in table (Tablename)
    By HelenP in forum Import/Export Data
    Replies: 3
    Last Post: 11-26-2010, 09:13 AM
  5. Should I have an "Or" in fieldname? (shudder)
    By trb5016 in forum Database Design
    Replies: 6
    Last Post: 06-29-2010, 10:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums