Forcing data control to update current record?

Forcing data control to update current record?

Post by David M.Ree » Fri, 23 Jul 1999 04:00:00



I have a form with some data bound text boxes, checkboxes etc
To display the required record on my form., I use something like :

Set data1.recordset=db.openrecordset("select * from table where
id='"+idString+"'")

The data control saves changes made to the bound textboxes etc, if the
current record changes (will never happen), or if it is unloaded.

How can I force the data control to save changes without unloading the
form?? I need to print a report on the displayed record (using Crystal
Reports), and any changes need to be committed to the file (Access .mdb)
first

--
=====-===-==-=-=--=--- -- -
David M.Reed

Web: www.highframerate.freeserve.co.uk
ICQ: 27301764
=====-===-==-=-=--=--- -- -

 
 
 

Forcing data control to update current record?

Post by John Reill » Sun, 01 Aug 1999 04:00:00


David,
    I sounds like you have found the limitations of the data control.  You
should explore the ADO and DAO coding methods.  It sounds like you need to
do an update function when you are on this record.  If your application is
mission critical use of  the data control will eventually prove to be a very
primitive way of database coding. Good Luck.
                                                          John

> I have a form with some data bound text boxes, checkboxes etc
> To display the required record on my form., I use something like :

> Set data1.recordset=db.openrecordset("select * from table where
> id='"+idString+"'")

> The data control saves changes made to the bound textboxes etc, if the
> current record changes (will never happen), or if it is unloaded.

> How can I force the data control to save changes without unloading the
> form?? I need to print a report on the displayed record (using Crystal
> Reports), and any changes need to be committed to the file (Access .mdb)
> first

> --
> =====-===-==-=-=--=--- -- -
> David M.Reed

> Web: www.highframerate.freeserve.co.uk
> ICQ: 27301764
> =====-===-==-=-=--=--- -- -