Results 1 to 8 of 8
  1. #1
    cshipley83 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    28

    First 3 numbers in Zip Code Query

    Hi all. Tried looking for this problem, but couldn't find anything relating to it. I need to make a mailing label that will pull all zip codes starting with 344 from my main table. Not sure how to go about doing this. Any help would be great. Thanks.

  2. #2
    jwhite is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Dec 2012
    Location
    North Carolina
    Posts
    349
    Look to use the Left() function on the field that contains the zip code. If still need help, please give us more information - table structure, sample records, etc.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Select * from table where [zip] like "344*"

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    How is zipcode Dimmed in your table?
    If you have defined zipcode as Numeric, you may need to convert it to String using
    CStr(zipcode) and then to get the first 3 "digits"

    ...Where Left(Cstr(zipcode),3) ="344"

  5. #5
    cshipley83 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    28
    Thanks for the help. I'm still so new at access and I don't work on it that often so I frequently forget stuff I've knew. Can you break it down a bit more for me. I'm not sure if I need to make a query first or go straight to making the label. Once one is made how do I get it to just pull up zip codes beginning with 344. My main table with the address information is called Donors. The Donors table has ACCTID, TITLE, FNAME, LNAME, ADDR1, CITY, STATE, ZIP fields. I need all these fields on the label, but only showing zip codes that begin with 344.

  6. #6
    cshipley83 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    28
    The ZIP field data type is short text in the design view of my table.

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  8. #8
    cshipley83 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    28
    Thanks this worked. In ZIP Criteria I put: Like "344*"
    Thanks for all the help

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

Similar Threads

  1. Replies: 12
    Last Post: 08-23-2016, 09:22 AM
  2. Replies: 5
    Last Post: 02-26-2016, 10:48 AM
  3. Replies: 8
    Last Post: 03-10-2014, 11:47 AM
  4. Replies: 1
    Last Post: 05-04-2013, 12:19 PM
  5. Replies: 1
    Last Post: 11-29-2011, 08:43 AM

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