Select Query not displaying data from both tables

DXZ08

New Member
Joined
Mar 24, 2008
Messages
12
Hi, I've run into a problem with my Select query.
I've imported two excel files into Access and saved them as Access tables. I've created two initial queries to filter both tables for the results I wanted. Now I'm trying to join the data from the two queries into a new one and I'm baffled why it doesn't work. Both queries contain the same SubjectID formatted as text that I'm using as join. One of the tables contains multiple rows of data per SubjectID and I want to see all of those multiple rows in the query output, thus the join is set up to show all records from this table and only those from the second table that match. The second table contains only one row of data per SubjectID.
I'm only trying to add one column of data from the second table to the first one and when I run the query, it displays only data from the first table - the column name shows up from the second table, but not the data. I cannot figure out why this is. I've made thousands of Select queries before and I can't figure out why this is happening. Any pointers?
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
In the 2 tables, are the SubjectID fields formatted and sized identically?

Is your relationship backwards? Are you linking the many-table to the one-table instead of the one-to-many?
 
Upvote 0
Both SubjectID fields are formatted as Text:
Field Size: 255
Required: No
Allow Zero Length: Yes
Indexed: Yes (Duplicates OK)
Unicode Compression: No
IME Mode: No Control
IME Sentence Mode: None

The join is set correctly, however, I haven't set any Table Relationships for this database, which wasn't a problem before either.
 
Upvote 0
Phildaburn, you hit the nail on the head! There was an invisible space after the SubjectID in one of the tables. Once I deleted it, it worked fine!

Thank you! Thank you! Thank you!
 
Upvote 0

Forum statistics

Threads
1,224,552
Messages
6,179,487
Members
452,917
Latest member
MrsMSalt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top