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

Showing a sum in a form based on a query or another table

Ulv
I don't get it !!! Stupid, stupid, stupid

I have 2 tables.

TblPostings:
Id, autonumber, key
BlockNo, text
NoofItems

TblItem:
BlockNo, text, key
I have a form called FrmItem that has the TblItem records.

I need a field in FrmItem showing NoofItems per BlockNo in TblPostings
I have to be able to filter the form based on that value later.

TblPostings
BlockNo NoofItems
44333 1
44334 -1
44333 -1
44335 -1
44333 -1

TblItem new field in form
44333 -1
44334 -1
44335 -1
Pls help !!

May 29 '07 #1
2 1638
Ulv wrote:
I don't get it !!! Stupid, stupid, stupid

I have 2 tables.

TblPostings:
Id, autonumber, key
BlockNo, text
NoofItems

TblItem:
BlockNo, text, key
I have a form called FrmItem that has the TblItem records.

I need a field in FrmItem showing NoofItems per BlockNo in TblPostings
I have to be able to filter the form based on that value later.

TblPostings
BlockNo NoofItems
44333 1
44334 -1
44333 -1
44335 -1
44333 -1

TblItem new field in form
44333 -1
44334 -1
44335 -1
Pls help !!
You could make a calculated control. In the controlsource enter
something like
=NZ(DSum("BlockN":,"TblPostings"),0)
I put in NZ since if there were no records you'd get a null return. I
figure you'd want to see a zero.
May 30 '07 #2
Ulv
On May 30, 10:09 am, salad <o...@vinegar.comwrote:
Ulv wrote:
I don't get it !!! Stupid, stupid, stupid
I have 2 tables.
TblPostings:
Id, autonumber, key
BlockNo, text
NoofItems
TblItem:
BlockNo, text, key
I have a form called FrmItem that has the TblItem records.
I need a field in FrmItem showing NoofItems per BlockNo in TblPostings
I have to be able to filter the form based on that value later.
TblPostings
BlockNo NoofItems
44333 1
44334 -1
44333 -1
44335 -1
44333 -1
TblItem new field in form
44333 -1
44334 -1
44335 -1
Pls help !!

You could make a calculated control. In the controlsource enter
something like
=NZ(DSum("BlockN":,"TblPostings"),0)
I put in NZ since if there were no records you'd get a null return. I
figure you'd want to see a zero.- Hide quoted text -

- Show quoted text -
Thanks for all help. I managed to create a query and then used
dlookup ....

May 30 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Richard | last post by:
Hi, I have a form based on a table. When I filter the form I want to run a report based on the same table with the same filter as the form. No problem until I want to filter a combo box where...
3
by: RC | last post by:
I can't quite grasp the concept of creating custom reports depending upon what options a user picks on a Form. For example, the user clicks on a "Print Reports" button and a Form pops up. On the...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
0
by: Jason | last post by:
I have a primary form which is used to enter/edit data in a table named Test_Results. On this primary form there is a subform which displays site addresses. This subform is linked to the primary...
1
by: meganrobertson22 | last post by:
hi everybody- what is the best way to add data from one form to another? i have 2 tables: person and contract. here are some of the fields. table: person personid (autonumber and primary...
4
by: john | last post by:
I created a form via the wizard with 1 main table and 2 one-on-one tables. As i couldn't add a field to the form (a field that I added to the table after creating the form), I googled out that the...
2
by: Timbo | last post by:
Hi there, I’m not used to working in VB and I think this situation calls for excactly that. I use Access 97 SR-2. My first table is a table containing all the Tickets I got. The field ”Ticket”...
4
by: Deus402 | last post by:
Here is my table design: tblEmployers EmployerID autonum (primary key) EmployerName text tblLocations LocationID autonum (primary key) EmployerID longint (foreign key) LocationAdress text
11
beacon
by: beacon | last post by:
Hi everybody, I created a database that links one table from an ODBC data source. I saved my password and UID to the data source so neither myself nor anyone else would have to login each time...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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.