Query based on field in current record

C

chris

If the form of your data is suitable you could use the
following code in the FormCurrent event

txtMiles.value = dsum
("MilesField","YourTable","RowKeyNumber <=" & cstr
(Me.RowKeyNumber))

and similar for duration.

-----Original Message-----
I have a form with specific record data and summed record
data for the entire database. For simplicity, each row is
numbered in order of entry.
How do I, on the form, show sums of the data from
beginning (1) to whatever record I am currently on? That
is, If I scroll through to record 234 on my form, how do i
get the form (or possibly a subform) to show the sum
of "duration" and "miles" of records 1 through 234, etc.
i can make a query that, based on an inputted number it
will do that but I want a query(?) to look at [Field_ID]
of the current record that I am on and use that as the
upper limit in my search.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top