RecordSet

G

Guest

Hi,

I have a form that requently updates the data from user inputs. However,
every update it opens the recordset, updates the data then closes the
recordset. I wonder if I could open a recordset globally so that every
update would not require the form to reopen the recordset again? Please let
me know if this is doable and how. If you have better ways of doing it,
please share it. thanks.
 
D

Dirk Goldgar

whatsup said:
Hi,

I have a form that requently updates the data from user inputs.
However, every update it opens the recordset, updates the data then
closes the recordset. I wonder if I could open a recordset globally
so that every update would not require the form to reopen the
recordset again? Please let me know if this is doable and how. If
you have better ways of doing it, please share it. thanks.

Is there a reason you aren't just using a bound form?
 
G

Guest

yes,
a bounded form is used to store the user inputs. the system needs to
calculate other numbers and store them into different tables. the
calculations are too complex for queries. it must be done through VBA in an
array. the result is then written to tables using recordset.
 
D

Dirk Goldgar

whatsup said:
yes,
a bounded form is used to store the user inputs. the system needs to
calculate other numbers and store them into different tables. the
calculations are too complex for queries. it must be done through
VBA in an array. the result is then written to tables using
recordset.

If you really need to do this, you could define a module-level recordset
object, open it in the form's Open event, and close it in the form's
Unload event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top