L
Laurel
I have a situation where I need to do a lot of calculations on the details
of a query before displaying the summarized results. I'm having a
difficult time sorting out the best approach for behind-the-scenes
traversing of recordsets, since everything in Access seems tied to a form.
The idea I have so far is this....
Note - If the manipulations could be done directly in the query, I'm not
good enough at SQL to manage it, so that's not a solution.
1 - Initially assign the detail query to my form.
2 - Set the fields to visible = false (since I don't want the user to see
the details at all)
3 - In my Load event, step through the recordset. Gather up my summary
information, do my manipulations, and write the results out to a reusable
summary table (I'm not sure how to do that in visual basic... could someone
help out here? Can you just do a SQL Insert statement inside of code? Or do
you have to use an Insert Query?)
4 - Reasssign the form's Recordsource value to the new summary table and do
a Me.Requery. Make everything visible.
The summary table will have the same column names as the original detail
table.
This seems pretty klugey. I'm hoping I'm just missing some basic technique
for working behind the scenes in Access. Please advise.
of a query before displaying the summarized results. I'm having a
difficult time sorting out the best approach for behind-the-scenes
traversing of recordsets, since everything in Access seems tied to a form.
The idea I have so far is this....
Note - If the manipulations could be done directly in the query, I'm not
good enough at SQL to manage it, so that's not a solution.
1 - Initially assign the detail query to my form.
2 - Set the fields to visible = false (since I don't want the user to see
the details at all)
3 - In my Load event, step through the recordset. Gather up my summary
information, do my manipulations, and write the results out to a reusable
summary table (I'm not sure how to do that in visual basic... could someone
help out here? Can you just do a SQL Insert statement inside of code? Or do
you have to use an Insert Query?)
4 - Reasssign the form's Recordsource value to the new summary table and do
a Me.Requery. Make everything visible.
The summary table will have the same column names as the original detail
table.
This seems pretty klugey. I'm hoping I'm just missing some basic technique
for working behind the scenes in Access. Please advise.