473,804 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1653
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("Block N":,"TblPosting s"),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.c omwrote:
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("Block N":,"TblPosting s"),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
6617
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 the text value is on a different table. The me.filter is then a text instead of the id-number from the lookup table. This causes the report to prompt for the parameter. How do I get by this problem? Do I need to create a temporary table? I rather...
3
2903
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 Form the user can choose to get a report that shows the Box Numbers that are at Warehouse A, Warehouse B or Warehouse C. and then click on the Print Preview button and get a report showing only the Box Numbers in whichever warehouse was...
25
10277
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 data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
0
2023
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 form by field named TestID. The subform is used just for displaying site address data, data which is stored in another table named Total_Site_Address. In the Total_Site_Address table there are numerous fields that form the site addresses...
1
3554
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 key) ss#
4
8562
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 form is based on a Select Query. I managed to alter that query so that the field shows up in the field list. My question is, why exactly does access base this form on a query? What is the difference and the benefit? Thanks, john
2
3342
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” is simply a ticket-number. I’ve made a form in which I am to choose an existing Ticket and write a description for it pluss other things. The description to these Tickets are stored in another table called ”LogBook”. I then made a query on all of...
4
2367
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
4098
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 (that's just bonus background info). I take this table, which is read-only, and run an APPEND query that adds new items from the table into another table I created (that has two additional fields that will be updated by the user via a form). I also...
0
9712
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, 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...
0
9594
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10341
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,...
0
9171
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, 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...
1
7634
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6862
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();...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4308
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3001
bsmnconsultancy
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...

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.