I have an Access 2000 database that has a table 'tblCourse' and a
table 'tblRegistratio n'.
They are linked via a Primary key 'CourseID' in 'tblCourse' to a
foreign key 'CourseID' in the tblRegistration , this is a one to many
relationship. The Primary key in the tblRegistration is
RegistrationID.
When I construct a query that has 'CourseID' and then e.g.
"CountRegistrat ionID:
IIf(IsNull(Coun t([tblRegistration].[RegistrationID]),0,
Count([tblRegistration].[RegistrationID]))" as the two fields, it will
not include the courses that have no registrations in them.
What I am wanting to obtain is a list of 'all' the courses including
the ones that don't have any registrations in them.
Do you have any ideas as to how to do this, or is it not possible?
Frustrated. 4 3582
Perhaps I am missing something, but can't you count the Courses in
tblCourse? It'd seem to me to be awfully difficult to count
non-registrations in the Registration table, unless you preallocate a record
per seat in each class or something.
Larry Linson
Microsoft Access MVP
"Craig" <cw*********@ce ntacarebrisbane .net.au> wrote in message
news:62******** *************** ***@posting.goo gle.com... I have an Access 2000 database that has a table 'tblCourse' and a table 'tblRegistratio n'.
They are linked via a Primary key 'CourseID' in 'tblCourse' to a foreign key 'CourseID' in the tblRegistration , this is a one to many relationship. The Primary key in the tblRegistration is RegistrationID.
When I construct a query that has 'CourseID' and then e.g. "CountRegistrat ionID: IIf(IsNull(Coun t([tblRegistration].[RegistrationID]),0, Count([tblRegistration].[RegistrationID]))" as the two fields, it will not include the courses that have no registrations in them.
What I am wanting to obtain is a list of 'all' the courses including the ones that don't have any registrations in them.
Do you have any ideas as to how to do this, or is it not possible?
Frustrated.
I am wanting to count the number of registrations against the course and
need to indicate to people if the course has 0 or more participants
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
"Craig Williamson" <cw*********@ce ntacarebrisbane .net.au> wrote in message
news:3f******** *************@n ews.frii.net... I am wanting to count the number of registrations against the course and need to indicate to people if the course has 0 or more participants
What kind of join are you using between the tables? It needs to be an outer
join. In the query design window it would have an arrow pointing towards the
table that might not have matching records. Double-click the line to change it.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
How about a Totals Query, grouped by Course, joined with a Query of the
Course table, "all records from Course and only those that match from the
Totals Query", and a calculated field of NZ(CountOfRegis trations)?
Larry Linson
Microsoft Access MVP
"Craig Williamson" <cw*********@ce ntacarebrisbane .net.au> wrote in message
news:3f******** *************@n ews.frii.net... I am wanting to count the number of registrations against the course and need to indicate to people if the course has 0 or more participants
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: yutlin |
last post by:
Hello,
Could anyone tell me if it is possible to bind a null value to a
statement? I.E.
$stmt->bind_param('isd',$var1,$var2,$var3);
$var1 = (something indicating null);
$var2 = (something indicating null);
$var3 = (something indicating null);
This would be useful as I have form fields that are not required and
|
by: Joel |
last post by:
Hi,
I added a field to my company table (PBV_rstCompany.Fields("Installer")) the
default value of the field is Null. I place this If statement and it doesn't
work
If PBV_rstCompany.Fields("Installer") <> "Y" Then
txtInstaller.Visible = False
lblInstallerLBL.Visible = False
cmdNextInstaller.Visible = False
|
by: AAVF |
last post by:
Hi
We have a problem with a query.
An Access database links via ODBC to a UNIX server. To speed things, we use
the ODBC to load the relevant tables to the local PC that runs Access so
that all querying is done locally.
One of the reports we run allows the user to list all invoices within a
period. They are also allowed to select a customer code and a product set on
|
by: allyn44 |
last post by:
Hello,
I have a table that has null fields that need to be filled in with the value of the previous record
(example below)
id date
1 2/2/02
2
3 4/4/02
4
|
by: JOEP |
last post by:
What do I need to do to allow an append query to post null values to
records in a field of the destination table? Basically I want to allow
records with null values to post to the table. The append query will
not work unless there are values in the data i am attempting to send.
I want the fields in the destination table to accept null and
populated values. Any help here would be gladly accepted.
thanks
| |
by: RiesbeckP |
last post by:
Hi All,
I have a DB where there are customer numbers and a few other fields. I
want to be able to pull all of the null records for a particular field
as well as all the other customer numbers that have null and non null
fields (see below).
CustNo Funding ClaimAmt Prod
123 R 100 PPO
123 R 200 Null Value
|
by: Dan |
last post by:
I'm fairly new to C# and I am having some problems
understanding int variables and null values.
I have created a class that populates the values of it's
fields from a DataReader in it's constructor. Those fields
are modified during various methods in the class. One
method updates the database with the values of the class
fields. I have everything working fine for string fields
but am running into problems with integers and null values.
|
by: Brett |
last post by:
My database has 2 tables: Table1 & Table2. If a field is not null on a
record in table2, then the not null fields in table1 that correspond to
the records in table1 needs to be updated to match the field in table2.
What I have is a form that is linked to Table2. If the users want to
change a field in the main database (table1), they fill the change in
to the form (which is linked to table2) If there is no change to the
field, they simply...
|
by: Debbiedo |
last post by:
I searched the groups and tried several approaches but still cannot
find a solution.
I have a table that has several hundred fields that may or may not
need to be displayed in a report, depending on whether they are NULL
or not. (Due to limitations of out software, the table needs to be
designed this way)
The data needs to be displayed like this:
|
by: Toby Gallier |
last post by:
Hello!
I have a form that is calculating averages as follows:
" =(NZ()+Nz()+Nz())/3 "
However I need to now adjust for null values , so for example if
value2 is null I would then need to base my average on just 2 values
instead of 3 i am currently using in my string. How can i have the
form update the "3" based on the number of values that are populated?
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |