473,395 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Blank Query Results

14
I need help in finding out why I am not getting any data in my query.

When I select all the fields in one table in my query grid and run it, the data is there. However, when I try to do it using to related tables and pull fields from both table in my query rid and run the query, data from both related tables are not showing in my query datasheet. What is the problem? The relationship line in my query is showing that the table are linked.

Thanks for your response in advance.
Feb 24 '09 #1
16 26865
ChipR
1,287 Expert 1GB
The relationship line means you are doing an inner join on the linked field, so only records that are equal in those fields from both tables will be shown.
Feb 24 '09 #2
BNW
14
@ChipR

Thanks for responding.

P.S. I have enough data in the fields and some are null fields. When I run the query and adding my criterias, the data should still show in my query datasheet. It is not doing it.
Feb 24 '09 #3
ChipR
1,287 Expert 1GB
Did you run the query first without the criteria to verify that you have some records to apply the criteria to?
Feb 24 '09 #4
BNW
14
@ChipR
Yes, I did one table at a time. The results showed.

But when I combined both tables in my query grid and selected the fields I wanted from both tables to be in my datasheet, none of the data shows in my datasheet from both tables after I ran the query. However, the relationship is established.
Feb 24 '09 #5
ChipR
1,287 Expert 1GB
Did you run the query with both tables and no criteria? I've had this happen when I expected NULL to match up with "" (empty string), and it didn't. I changed all the NULLs to blanks and then the join produced the results I expected. Double check to make sure the line between your tables in the query is between the two fields that have equal values in them.
Feb 24 '09 #6
BNW
14
@ChipR

Yes, I ran the table with a criteria in it. It still didn't give me not results (empty data). I will probably need to check to see if the relationship line between both of my fields have equal values. I'll let you know. Thanks
Feb 24 '09 #7
BNW
14
@ChipR

I checked my related fields in my table. The primary table have both Letter and numbers in the field and the Foreign table have regular letters (it is a combox box field in which I can select the values from the list). However, both of them have the same data types.
Feb 24 '09 #8
ChipR
1,287 Expert 1GB
Your query is only going to have results when the values in the two related fields are exactly equal. It sounds like your two fields are not actually related at all.
Feb 24 '09 #9
BNW
14
@ChipR
Here is an example.

Primary Key Field (CustomerNumber) value is "AC001"

Foreign Key Field (CustomerNumber) value is "All Creatures". This is a lookup field that have the value list box.

I'm trying to rebuild this database from my Access 2000 Bible reference/text book called "Mountain Hospital Animal Database" and that's what the relationship is showing for these two tables. Both of these fields have the Text datatype.
Feb 24 '09 #10
ChipR
1,287 Expert 1GB
As you can see, the value "All Creatures" is not a CustomerNumber. The CustomerNumber in the foreign key should also be "AC001" and the "All Creatures" should be in another field, like Description (or whatever you want to call it).
Feb 24 '09 #11
BNW
14
@ChipR
Ok. Thanks

I just don't understand why for this database table they have them fields the way they are. I wish I can send you a copy of this relationship printout sheet through MS Word so you can see what I am trying to convey. It is not a 1 to many relationship. It is a 1 to 1 relationship.
Feb 24 '09 #12
ChipR
1,287 Expert 1GB
I think I do understand your situation, and as best I can tell, the fields are just labeled improperly. Unless your value list is supposed to have 2 columns, and the 1st is the actual value, but is hidden. The FK values have to be PKs in the other table, regardless of the relationship.
Feb 24 '09 #13
BNW
14
@ChipR
I understand what you are saying about the 2 column values. I'll recheck the table documentary summary I printed out as well as the main Mountain Animal Hospital Database to see if it does have the 2 columns values with the Primary Key column as well as the other value column.

I'll let you know. Thanks for all of your help.
Feb 24 '09 #14
BNW
14
@ChipR


Hi ChipR

I check the other database in which I am using the recreate it. It does have 2 columns but the other value column have the PK values.
Thanks again.
Feb 24 '09 #15
ChipR
1,287 Expert 1GB
No problem. Glad you got it straightened out.
Feb 24 '09 #16
BNW
14
@ChipR
OK Thanks a million
Feb 24 '09 #17

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: dan glenn | last post by:
Hi. I'm finding that if I have text entered into a <textarea ...> </textarea> in a form, and that text has leading blank lines (with no spaces or anything else), that when I retrieve the entered...
2
by: jaysonsch | last post by:
Hello! I am having some problems with a database query that I am trying to do. I am trying to develop a way to search a database for an entry and then edit the existing values. Upon submit, the...
3
by: feel_free_to_spam_me | last post by:
Hi. I'm a sorta novice ASP programmer, so I sure could use some help from of you more experienced gurus.... I've written an ASP page that pulls all records from a table. My query is 'SELECT *...
1
by: Andy | last post by:
I have a simple query that basically pulls in an employee's name, and 3 different scores. I am trying to make a report where each employee shows up on a different page, and the 3 scores are shown...
6
by: Andy | last post by:
Hello, I am having many problems with setting up a parameter query that searches by the criteria entered or returns all records if nothing is entered. I have designed an unbound form with 3...
1
by: John Baker | last post by:
Hi; Dumb question, but I have a query and i want to accept the record if a field is blank. I have tried criteria of ="", isempty(Fieldame) and a rich variety of other things with no joy. How do...
0
by: visionstate | last post by:
Hi there, I have a form which has 2 text boxes, a combo box and a sub form in it (which reads from a query. The query reads from the table). On load, I would like the fields in the text boxes and...
11
by: techjohnny | last post by:
Ok, I posted earlier about this, a blank php page. I've enabled logging ALL in the php.ini, but nothing. If I change the name of the db in the include file, I get an error message, so I guess...
4
by: ArizonaJohn | last post by:
Hello, The code below works great. The user enters a name into an HTML form, the code looks up a table with that name, and then that table is displayed. I am trying to use pagination with it,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.