update query - repost

M

mackie

i have two tables linked together.
Table descriptions
table 1 = project particulars (name,date received..etc)
table 2 = project items (name,qty)

i am using queries for my form. one in particular is
to sum the qty from table2.

i have a "textbox" displaying the sum of all the qty from
table 2 (per group or project from table 1)

my question is, is it possible to display or update the
sum of "textbox" as i am keying in project items qty???

what i wanted is lets say, i am keying in figures to qty
field, as soon as i hit 1 or 2 .....
display of sum will be updated that looks like
im directly inputting data on that textbox.....

viewing the encoded records are all ok
but the sum will not be updated or be displayed until i
save the current record and move the record pointer prev
or next...

can anybody figure out if this is possible??

TIA
 
S

Steve Schapel

Mackie,

Try putting code like this on the After Update event of the Qty textbox
on your form...
DoCmd.RunCommand acCmdSaveRecord
Me.Recalc
 
M

mackie

here's the actual picture

================================
mainform: record source table1

project name (** bound textboxes)
date**
xxx**
xxx**
(total of qty from table 2) "qtydisplay"
---------------
| subform: record source table 2 (datasheet view)
| name qty
| xxxxxxx 12
| xxx 156

=======================================================

viewing saved records are all ok.
the task i wanted to accomplish is
to update "qtydisplay" on the main form
while im keying in the qty on the subform

is it possible??

thanks again..
 
Top