G
Guest
I have successfully used the Totals row to count records; however, my
ultimate goal is to use these counts to update a table, so I need to use
DCOUNT(). My guess is that I don't understand the syntax and that is why I
am running into problems.
Here's the situation:
I have a Shop Order Table with the following fields:
Shop Order #: this is a unique value and the primary key
Quantity required: this is the number of parts required to fill the order
Quantity made: this the number of parts completed and the field I
ultimately want to update by counting the number of parts listed in another
table with that Shop Order #.
Closed: is a boulean field which is true once the number made and the
number required are equal the inventory has been adjusted. The update query
I use to change this field value is working!
I have a table called Modules with the following fields:
Shop Order #: joined to the shop order number in the above table
Module ID: unique number for each part we make.
One shop order may have several module ID's if more than one part needs to
made to fill the order. I can either count the number of times the Shop
Order # appears in this table or the number of unique modules for each shop
order. I do not know which is easier.
The query needs to produce something that looks like this:
Shop Order # ModuleCount
1 3
2 1
3 2
4 0
So that I can use this data to update the Quantity Made field in the Shop
Order Table.
Thank you,
Irene
ultimate goal is to use these counts to update a table, so I need to use
DCOUNT(). My guess is that I don't understand the syntax and that is why I
am running into problems.
Here's the situation:
I have a Shop Order Table with the following fields:
Shop Order #: this is a unique value and the primary key
Quantity required: this is the number of parts required to fill the order
Quantity made: this the number of parts completed and the field I
ultimately want to update by counting the number of parts listed in another
table with that Shop Order #.
Closed: is a boulean field which is true once the number made and the
number required are equal the inventory has been adjusted. The update query
I use to change this field value is working!
I have a table called Modules with the following fields:
Shop Order #: joined to the shop order number in the above table
Module ID: unique number for each part we make.
One shop order may have several module ID's if more than one part needs to
made to fill the order. I can either count the number of times the Shop
Order # appears in this table or the number of unique modules for each shop
order. I do not know which is easier.
The query needs to produce something that looks like this:
Shop Order # ModuleCount
1 3
2 1
3 2
4 0
So that I can use this data to update the Quantity Made field in the Shop
Order Table.
Thank you,
Irene