Sam,
To be able to set the sample rate at runtime, you will probably want to move away from the DAQ Assistant and use the more advanced DAQmx VIs. There are plenty of examples using these VIs. You can find them by going to Help>>Find Examples in LabVIEW and navigating to Hardware Input and Output>>DAQmx>>Analog Measurements>>Voltage. This is assuming that you have a device that is supported by DAQmx. (If you are using the DAQ Assistant, then your device is supported by DAQmx).
As far as the averaging that you are trying to do....that might be a little more difficult. It is basically going to take some additional math and probably some array manipulation. I took a shot at writing a LabVIEW program (attached) to do this. If you look at the block diagram, you will see that I put the DAQmx Read.vi in a case structure that does averaging based on the loop iteration. Right now, the VI will only go through your T, 2T, and 4T iterations, but it could be manipulated to go further. This VI also displays the data on a waveform graph as it is acquired. I saved the VI to LabVIEW 7.0.
Hope this helps!
-Alan A.
Disclaimer: This might not be the best way to approach your averaging problem, but it is one idea.