473,398 Members | 2,403 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,398 software developers and data experts.

No data shows when I run a query

Hi there,

I have a small database in MS Access that is causing me some issues.

I have a Main Form "A" which has a number of Subforms "B", "C", etc.

Main Form A has 'autonumber' as the unique identifer for each record, whereas subforms B, C etc have their primary key as simply 'number'. These fields are linked.

I am able to show records for each subform that relate to the Main Form just fine. However, there are some details in the subforms that contain no data - this is normal, as some information may not be applicable.

When I do a Select query on the corresponding tables based on the primary key of the Main Form, if no data is stored in subform B's table, the query shows no data. This throws out the entire query.

My desired outcome is for '0' to be presented as opposed to nothing.

Any advice?

Thanks
Jan 30 '12 #1
4 3976
TheSmileyCoder
2,322 Expert Mod 2GB
In the query designer, double click the link between the two tables, and select option 2 or 3 as applicable. This is called a one-way join, and I believe that is what you are after.

This will however not show 0, it will show blank (Null). If that is not sufficient please just say so and we can work something out. I just dont want to complicate things, unless its really necessary.
Jan 30 '12 #2
Hi Smiley,

I need to show '0' instead of blank or null.

THanks for a quick reply.
Jan 30 '12 #3
i have the same problem, did u find the answer
Feb 13 '12 #4
MMcCarthy
14,534 Expert Mod 8TB
I find this bit confusing ...
"Main Form A has 'autonumber' as the unique identifer for each record, whereas subforms B, C etc have their primary key as simply 'number'. These fields are linked."

Do you mean that the primary key in tables behind subforms B and C are set to the same values as the primary key in table A?

You need to give a lot more information on what data (tables and/or queries) are behind each of the subforms and how they are linked to each other before we can help.
Feb 13 '12 #5

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

Similar topics

1
by: Yisroel Markov | last post by:
Greetings, In Access 97 I have a subreport with two labels and a control. The record source for the control is a simple SQL query referring to another query: SELECT DISTINCTROW...
2
by: Francis Debrabandere | last post by:
Hi all, I'm a beginner in ms access, and I'm working on my first real application. But to finish it up I'm facing a problem. I'm not able to solve and maybe someone can help me. I have made a...
6
by: Andy | last post by:
I'm making a drag and drop application, and in the *_DragDrop(...)-method I have the following code: private void SelectTree_DragDrop(object sender, System.Windows.Forms.DragEventArgs e) {...
1
by: chris.thompson13 | last post by:
Any relevant advice would be most appreciated for the following problem I have. I have a query that draws its data from 7 other queries. I would like to be able to edit data through that query....
5
by: BlackIce | last post by:
I want to query one table and get back two simple sets of data with one query. I have a table with date start, date ended, scheduled/unscheduled. I want to be able to get all of the dates within...
1
by: suzieq | last post by:
This might be total newbie, and I apologize if it is, but it is making me insane. I have a database with lots of tables, queries and reports (someone else made the database and I am now taking...
3
by: crystalgal | last post by:
Hello. I have form which has a text box called "text7". I want to display data from a query "ProQuery002". Please help I have tried everything.
2
ebs57
by: ebs57 | last post by:
Would the experts please indicate how to pass unbound control data to a query? When I pass a bound field from a combo box to my select query, everything is fine; when I change the combo box to an...
2
by: dez5000 | last post by:
I have a query that is pulling a list of patients seen within a certain time frame at certain locations and it also shows whether they had a certain test done. I want to report by location the list...
1
by: maryanncanor | last post by:
Hi I would like to know if there is a macro that can export the data from a query to an output textfile that has NO QUOTES. If I run the concatenated query Expr1: & & & & & & & ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.