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



On May 30, 10:09 am, salad <o...@xxxxxxxxxxx> wrote:
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 ....

.