Hello. I am using MS Access 2003 on Windows XP. My database is concerned with keeping track of assemblies, parts and fasteners. I have a table which relates assemblies and parts, and a second one which relates parts and fasteners. (One chair assembly for example has as parts: 1 seat, 4 legs. Each leg requires 2 screws, so the assembly requires 8 screws.) I have a form which allows users to copy existing assemblies, then modify the parts list to create a new assembly. Is it possible to create a query or table which totals each type of fastener automatically? For instance, if the user decides to only have 3 legs on his chair, I would like the query to show that the assembly requires 6 screws.
As always, you guys are a God-send.
Thanks!
nickvans
4 1763
you could do this in the control source of the chairs: - =IIf([Chairs]=3,6,IIf([chairs]=4,8))
and do this to all the rest, just follow how the code is and add on to it.
lee123
you could do this in the control source of the chairs: - =IIf([Chairs]=3,6,IIf([chairs]=4,8))
and do this to all the rest, just follow how the code is and add on to it.
lee123
Thanks for getting back to me. Unfortunately, this approach won't work very well for me. I have about 200 assemblies, and about as many parts, so doing it this way would be impossible. Also, if a new modification were made, a new criteria would have to be input, which is far from ideal from a data-management point of view.
well you can put it in the after update in the chairs like this:
Private Sub chairs_AfterUpdate() -
-
If chairs = 3 Then
-
screws.Value = 6
-
elseif chairs = 4 then
-
screws.value=8
-
-
End If
End Sub
lee123
Assuming a Table structure as follows: tblAssembly
AssemblyID (Primary Key)
AssemblyName tblPartPerAssembly
AssemblyID (Joint Primary Key)
PartID (Joint Primary Key) tblPart
PartID (Primary Key)
PartName tblFastnerPerPart
PartID (Joint Primary Key)
FastnerID (Joint Primary Key)
Qty tblFastner
FastnerID (Primary Key)
FastnerName
You can now run the following query. -
SELECT tblAssembly.AssemblyID, tblAssembly.AssemblyName, Sum(tblFastnerPerPart.Qty) As Quantity, tblFastner.FastnerName
-
FROM ((tblAssembly LEFT JOIN tblPartPerAssembly
-
ON tblAssembly.AssemblyID = tblPartPerAssembly.AssemblyID)
-
INNER JOIN tblFastnerPerPart
-
ON tblPartPerAssembly.PartID = tblFastnerPerPart.PartID
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Zhang Le |
last post by:
Hi,
I did a small benchmark of matrix-vector multiply operation using
Numeric module. I'm a bit suprised to find matrix*col-vector is much
faster than row-vector*matrix. I wonder whether other...
|
by: Martin Pettersson |
last post by:
Hi all,
I'm trying to multiply parent values in xsl. The thing is that I start
with a value down in the xml-structure. From that value (in my case
'qty' value) I check the parent value and later...
|
by: yukatan |
last post by:
Maybe it's a newbie question, but if I have two strings, let's say s1="4"
and s2="5", how can I get a new string of value "9", that is, add the two
numbers. If I type:
var newStr = s1 + s2
all I...
|
by: christopher diggins |
last post by:
Here is some code I wrote for Matrix multiplication for arbitrary
dimensionality known at compile-time. I am curious how practical it is. For
instance, is it common to know the dimensionality of...
|
by: trint |
last post by:
Why do we have to use decimal.multiply to multiply two intgers?
I just want to multiply these two values:
int oneThousand = 1000;
int watCHTimer1 = value from a textbox;
Thanks,
Trint
|
by: vips |
last post by:
I have a string
str="10*12*14"
now I want the total of this value
i.e. 10 multiply 12 multiply 14
how do i get it ?
is there any function in vb.net to do that ??
if i put it as query to...
|
by: komandjaja |
last post by:
Hi everybody.
I am new here and I don't know much about CSS. However, I have a blog at multiply http://komandjaja.multiply.com and I have customized the CSS codes there to make a new theme. When I...
|
by: Janaka Perera |
last post by:
Hi All,
We have done a object oriented design for a system which will create a
class multiply inherited by around 1000 small and medium sized
classes.
I would be greatful if you can help me...
|
by: Default User |
last post by:
Hi,
If I have three 64 bit integers and I want to do this operation on them:
x*y/z
Lets say that what we are multiplying by (y) is offset by what we are
dividing by (z) so that the final...
|
by: Gavin Chen |
last post by:
Hello:
I tried to install Tk800.015 on SunOS 4.1.4 with perl 5.6.2. At "make test" time, I got the error message as below:
collect2: ld returned 2 exit status
ld:...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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...
|
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,...
|
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...
| |