Results 1 to 5 of 5
  1. #1
    denver1717 is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2012
    Posts
    16

    Question column heading 01, 02, 03... drops leading zero queries later


    I have a query in which the columns are text (Jan-Dec - so 01,02,03...,12).

    I could rename the columns, but I have a lot built off of this query. I know exactly what the problem is when my other queries won't run (and go back and put the leading zero in the column and save it - then the other query will run) but I was hoping maybe someone would know how to retain the leading zero? I tried quotes, but all that does is put quotes in the column.

    Thanks for any help!

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    I am not sure I understand. If you format the field as Text instead of Numeric, your leading zeroes should be retained.

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I am guessing that you have a table with field names 01, 02, 03,...,12. This is a poor design - the field names are not descriptive.
    Since you keep having to "fix" a query, you should go ahead and fix the problem one and for all.
    You say they represent months, so a better field naming scheme might be Mth01, Mth02, Mth03, ..., Mth12

    There are apps, both free and for purchase, that will find and replace (all) references to a name.

    I think there is:
    "Speed Ferret" (about $99 ??) ..... http://www.speedferret.com/
    "Find and Replace" (about $37) ..... http://www.rickworld.com/products.html
    FMS Total Access Analyzer ($$).... http://www.fmsinc.com/

    You could even try turning on "AutoCorrect", do the changes, and turn it back off...

    Look for "Scan and replace utilities" section at: http://www.granite.ab.ca/access/thirdparty.htm

  4. #4
    denver1717 is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2012
    Posts
    16

    the columns are expressions

    Quote Originally Posted by JoeM View Post
    I am not sure I understand. If you format the field as Text instead of Numeric, your leading zeroes should be retained.
    The filed is an expression (01:round(sum[JanVol]),0) -or something along those lines. It retains the "01", but as I use other queries down the line eventually I get prompted for parameters for [01], [02], ... through [09], and it's because at some point those queries drop their zeros. All I have to do is go back, open the problem query and add the zeros to the 1-9 column, but I was wondering if anyone had had this happen to them, and had a fix.

    I have gathered from the responses I have received that I need to redesign the column headings. I am cool with that - I am a beginner, but I plan to copy the database and start from there so I have the other as backup. I started a job that heavily uses Access last year, and a lot of our databases/queries are centered around what this one Access guru employee built (we have tables/queries named with 2003 that people refuse to change because so much is dependent on it). I'm thinking someone copied one of his databases over and started modifying it on his/her own.

    Thanks for your help

  5. #5
    denver1717 is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2012
    Posts
    16
    Thanks for your help! Will do! I also will definitely be putting more thought into naming my columns going forward. I have a hard time naming columns (though more so queries) with short names that are also reflective of what's going on (so that when I look back at the steps I understand what I was doing at the time), but it definitely is worth the time investment to do so.

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

Similar Threads

  1. Replies: 4
    Last Post: 07-27-2012, 07:04 AM
  2. Replies: 3
    Last Post: 02-21-2012, 10:15 AM
  3. Replies: 20
    Last Post: 02-14-2011, 10:55 AM
  4. Problem with cross tab on column heading
    By pascal_22 in forum Queries
    Replies: 0
    Last Post: 12-01-2010, 08:00 AM
  5. Populating list box with column heading?
    By kawi6rr in forum Programming
    Replies: 1
    Last Post: 08-13-2010, 12:51 PM

Tags for this Thread

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