L
Larry Smith
Hi there,
I'm an experienced C++ programmer but I don't use Access very often. Can
someone set me on the right path to creating a "Total" button on a form I've
created. Besides the "Total" button itself, the form has a "Start" and "End"
date field (text box) and a "Total" field. I simply want to fill the "Total"
field in with the "Sum()" of a given column in one of my tables for each
record whose start and end date fall between the dates entered on the form
itself. The "Total" button should therefore ensure that the "Start" and
"End" dates are properly filled in and if so, run the appropriate SELECT
statement to fill in the "Total" field. Presumably I can simply create a VBA
function and wire this up to the button's "On Click" event but where to
create this function and how to set the "Total" field with the SELECT
results is eluding me (note that creating the form itself isn't an issue).
Can anyone offer any advice or link on the subject. Thanks in advance.
I'm an experienced C++ programmer but I don't use Access very often. Can
someone set me on the right path to creating a "Total" button on a form I've
created. Besides the "Total" button itself, the form has a "Start" and "End"
date field (text box) and a "Total" field. I simply want to fill the "Total"
field in with the "Sum()" of a given column in one of my tables for each
record whose start and end date fall between the dates entered on the form
itself. The "Total" button should therefore ensure that the "Start" and
"End" dates are properly filled in and if so, run the appropriate SELECT
statement to fill in the "Total" field. Presumably I can simply create a VBA
function and wire this up to the button's "On Click" event but where to
create this function and how to set the "Total" field with the SELECT
results is eluding me (note that creating the form itself isn't an issue).
Can anyone offer any advice or link on the subject. Thanks in advance.