PDA

Click to See Complete Forum and Search --> : Record modification date


May 3rd, 2000, 03:42 AM
I'm using textboxes linked to a data control in VB6. The data control is in turn opening a Dynaset from an Access database. My problem is this:

I want to add a date field in the database to mark the last time each record was modified.

The update to the datacontrol.recordset is done automatically when a movenext or moveprevious is executed (as the user steps through the recordset for example). Since there's no update event generated by a data control (I think), I don't know how to detect when I should write the date to the database.

Any ideas?

- john

curlywink
May 3rd, 2000, 06:31 AM
Hi there,

Try to disable the data controls navigation when you try to add records then on update insert your code to flush the current time and date to the field you want...


Hope this works ...

May 3rd, 2000, 10:32 PM
I could, of course, do the update manually every time the user clicks the "next" button or "previous" button on my form, but that would require a considerable amount of recoding and is not really practical (I'll do w/o it first). Thx for the suggestion, but still looking for more...

Anyone?

curlywink
May 4th, 2000, 06:41 AM
Hi there,

I would like to ask, are you using the Data control navigation buttons or buttons of your own ???

May 4th, 2000, 11:07 PM
I use a data control with visible=FALSE. The user clicks on separate buttons, say btnNext and btnPrev, which essentially call the .movenext and .moveprevious methods on the recordset. There's some other stuff going on, but that's the story in a nutshell. I could just add the date when they click those buttons, but I need to know if the record is "dirty" or not.

-john