The dataset should actually be declared at form level so that you can see it from other events on the form.