Continuous form problems.

Reppers

Registered User.
Local time
Today, 05:01
Joined
Oct 27, 2008
Messages
32
Hello!

I'm currently working on a a form which displays student's names with grades given at various times over the year. I want to populate a field within the grades table with the difference between the most current assessment and the previous assessment. I appreciate that this is not normally done, however I need to perform various averages with the Progress column later.

I have created an update query which finds an individual child, and then subtracts the previous assessment from the new assessment to get the difference. I inserted a button onto the continuous form, and everything works as expected - each button updates the row that it is on.

I would like, however, to be able to automate the update process, so rather than having to click on every button, on loading the form each button would run. Is this possible?

If you look at this and think it's very convoluted, I'd be more than happy to hear a simpler work around!

Cheers!
 
It sounds like you answered your own question. Make your "run query" command execute on the onload event of your form.
 
I did try that, and it does update one of the rows.

The issue is that the runquery button is sitting in the detail section of the continuous form, and each button only updates its row - so to update each row, I need to manually click 30+ buttons. I was looking for a work around which would say "on load, click each of the buttons on in the detail section" - the number being pressed being dependent on the number of rows on the form. Does that make sense?
 
I'm puzzled by this. If you are attempting to do this on form load then presumably the table already contains the previous and current grades, so the difference can be created whenever needed, the correct approach, however if you must calculate and store this in the table then a simple update query should work.

Your table design and maintenance are also intrigueing.

Brian
 

Users who are viewing this thread

Back
Top Bottom