Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1031973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:00:52+00:00 2026-05-16T14:00:52+00:00

I have defined three tables, Stores, InventoryItems and StoreItemRecords. My StoreItemRecords table has foreign

  • 0

I have defined three tables, Stores, InventoryItems and StoreItemRecords. My StoreItemRecords table has foreign key columns (StoreID, InventoryItemID) that “point to” the primary keys of the Stores (StoreID) and InventoryItems (InventoryItemID) records. The columns are named the same between the tables.

If I run a query like this:

SELECT StoreID, InventoryItemID FROM StoreItemRecords;

I get some bizarre results. I get:
1, Hammer
2, Box of Nails
3, Some other item name.

So, I am getting the StoreID, as I should. But I am also getting the NAME of the inventory item, not the ID of the inventory item. Also, it is important to note that the InventoryItemID column is defined as a NUMBER, not TEXT.

So somehow, Access is trying to help me by providing the InventoryItemName in place of the InventoryItemID, but I can’t seem to find the cause of this behavior or any way to stop it.

[one more note. I have written some VBA code to populate the StoreItemRecords table and, in debug mode, I can “watch” the InventoryItemID values being assigned to the column, and I have verified that the IDs are actually being put in there.]

Has anyone seen behavior like this? I know I am going to feel really dumb when someone points out the goofy thing I am doing to cause this but, at this point, it is worth the embarrassment.

Thanks in advance for any help you can provide.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:00:53+00:00Added an answer on May 16, 2026 at 2:00 pm

    My money is on one of the fields being setup as a “lookup table” in access. These are generally considered to be a not so useful feature of access trying to help novice developers who find it hard to grasp how a database works.

    If you go into the table in design mode you should be able to verify if that is set on the fields in question. If it is turn it off and try the query again

    Here is a link on why they are evil

    http://www.mvps.org/access/lookupfields.htm

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have three tables: unmatched_purchases table: unmatched_purchases_id --primary key purchases_id --foreign key to events
I have three tables -- stores, addresses and sales. Each store has one or
I have three tables which are defined as: class User(Base): __tablename__ = 'users' id
I have a TableLayout defined in my xml with three columns and four rows
I have a table say, ITEM, in MySQL that stores data as follows: ID
I have three tables (people, clients_people, clients) that would be joined using SELECT *
I have a Full Text Catalog on single table, with three fields defined :-
This has been driving me mad. I have three tables: items ID name type
I have a table that stores a pupil_id, a category and an effective date
I have a TabActivity with three tabs defined. The first tab is light-weight and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.