Image of Navigational Panel mapped to Contents / Home / Search MDB File Record
Tech Support Question

Image of Line Break

Q. I am trying to find, or maybe you might know, a way that VB4 can check to see if a field in a MDB file record has been changed or has been added. All I am needing it to do is to flag back to my VB4 program and set a timer to true. Hence, set an object to flash, ie, like a text box, white to red, on and off.

Thank you, if you can help, it would be great.

From: Tony Piro
Email: tpiro@stthomas.org

A. You need to modify the table in question so it has a ts (timestamp) field, and modify all your update logic - so that every time something touches a row the timestamp gets updated.

If you update in code you will have to assign

  MyDynaset![ts] = Now 

every time a row is updated or created.

Jet SQL has access to all the built-in (but not user-defined) function in Access Basic. If you use SQL to perform bulk updates from a staging table you can automate the timestamping like this

  UPDATE MyTable (..., ts) ... Now WHERE some condition;

When you want to know whether a row is stale, you can read it again into a temporary variable and check the timestamp's current value again the value it had when last it was read.

Peter Wone.
Email :
peterw@gui.com.au


Image of Arrow to Previous Article Image of Arrow to Next Article

[TECH SUPPORT TOC]
Image of Line Break
[HOME] [TABLE OF CONTENTS] [SEARCH]