By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,747 Members | 1,328 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,747 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.