+ Reply to Thread
Results 1 to 6 of 6

Query showing only 1 record? Access 2010

  1. #1
    Registered User
    Join Date
    11-18-2014
    Location
    Tampa, U.S.A.
    MS-Off Ver
    MS-Office 2010 Professional Plus
    Posts
    13

    Query showing only 1 record? Access 2010

    Hello. I am trying my hand on Access to try to work 2 large sets of excel file. Since my system is just hanging up with my trying to move around 500,000 record file, I decided to see if Access could help me. Immediately, I am finding myself lost.

    Just to try to understand something:

    I have a 4-col table: CITY, STATE, ZIP, COUNTY

    SQL query is:
    SELECT [CB Data].City, [CB Data].State, [CB Data].zip, [CB Data].cty_name
    FROM [CB Data]
    WHERE ((([CB Data].State)="TX"));

    In Design View: I enter just TX in criteria box for State.

    When I run the query, I get one record back with TX under State. No values under CITY, ZIP and COUNTY. I can't make sense of it. There are over 2000+ records for State = TX.

    If I can understand what's going on then I need to do this:

    Table 1 has: CITY, STATE, ZIP
    Table 2 has: CITY, STATE, ZIP, COUNTY_NAME

    Join Table 1 to Table 2 on CITY, STATE, ZIP and pull COUNTY_NAME

    Never had a need to use Access and now I need to start dabbling in it.

    Appreciate your help in advance.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,874

    Re: Query showing only 1 record? Access 2010

    The query is case sensitive. Are all records for Texas capitalized? Do any have spaces before or after the the data? Are you using a lookup table in a form to populate the State value?
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,176

    Re: Query showing only 1 record? Access 2010

    I have NEVER seen a query be case sensitive. It always ignores case.

  4. #4
    Registered User
    Join Date
    11-18-2014
    Location
    Tampa, U.S.A.
    MS-Off Ver
    MS-Office 2010 Professional Plus
    Posts
    13

    Re: Query showing only 1 record? Access 2010

    Thank you for the reply. I will review in light of your questions. I hope to be back today.

    I found an issue in the Excel file. The two data sets that I am comparing (Table1 against Table2 and trying to pick up a Table2 value for matching records) have issues. one or the other table has special characters as I just discovered a few minutes ago. I created a test bed of my own and excel multi-column index_&_match formula worked as expected but wouldn't work against the actual records. In absence of this knowledge, I had tried to use Access as a possible solution. I seem to have taken a positive step forward on my analysis. But I still want to use these tables as guinea pigs to exposing myself to Access.

    So, the issue is not so much in Access, it seems. The SQL had seemed fine to me yesterday which was more confusing to me.

    Once I can get my issue resolved in Excel then I can start again on Access.

  5. #5
    Registered User
    Join Date
    11-18-2014
    Location
    Tampa, U.S.A.
    MS-Off Ver
    MS-Office 2010 Professional Plus
    Posts
    13

    Re: Query showing only 1 record? Access 2010

    Quote Originally Posted by ranman256 View Post
    I have NEVER seen a query be case sensitive. It always ignores case.
    Also, one column had upper case city names but that data was "visible" as a result of the "UPPER" formula. I had read the file as is in the Access and was using that field in the Access query build up. That might have been another issue. I have to copy the column as "value" and remove the other column with the formula. So, when I bring the data back, once I have the issue resolved in Excel, all the columns (CITY, STATE) will be upper case as values (no formulas showing data).

  6. #6
    Registered User
    Join Date
    11-18-2014
    Location
    Tampa, U.S.A.
    MS-Off Ver
    MS-Office 2010 Professional Plus
    Posts
    13

    Re: Query showing only 1 record? Access 2010

    Update: I did find a space in front of a data element. I trimmed it and was able to apply my formulas successfully in Excel. I will play with importing and doing the same in Access to start learning a bit in Access. I will do this next week. Hope all, for those in the USA, have a great Thanksgiving holiday!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 10-16-2014, 10:05 PM
  2. [SOLVED] Access 2010 unable to use multiple dates in record in SQL SELECT statement
    By Harry73 in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2013, 10:19 PM
  3. [SOLVED] Trying to "automate" inserting record numbers in Access 2010 query
    By alcharbonneau in forum Access Tables & Databases
    Replies: 7
    Last Post: 05-18-2012, 01:03 PM
  4. Update/Delete a Record in an Access 2010 Database using Excel VBA
    By tomlancaster in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2012, 12:36 PM
  5. MS Access record delete from excel database query results
    By sdnicsm in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-23-2005, 03:55 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1