If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
counting overwritten values from a specific field
I'm trying to create a field that automatically counts the number of times a
different field has been 'updated'. Specifically, the field being updated is a date field. The actual date does not need to be saved. How many times that date is changed, however, is important. I know I create a text field to capture this--can't seem to come up with the correct code, however, to do so. Can you help? Thanks. |
#2
|
|||
|
|||
counting overwritten values from a specific field
Margo,
I'm assuming you have a form created to allow data entry against the table with the date field (ex. [SomeDate]). Add a Numeric Integer field to that table, (ex. DateChangeCount), and include that field on the form. You don't have to display it, just include it the form query. Using the AfterUpdate event of the SomeDate field... Private Sub SomeDate_AfterUpdate() DateChangeCount = DateChangeCount +1 End Sub -- hth Al Campagna Candia Computer Consulting - Candia NH http://home.comcast.net/~cccsolutions "TGMagro" wrote in message ... I'm trying to create a field that automatically counts the number of times a different field has been 'updated'. Specifically, the field being updated is a date field. The actual date does not need to be saved. How many times that date is changed, however, is important. I know I create a text field to capture this--can't seem to come up with the correct code, however, to do so. Can you help? Thanks. |
#3
|
|||
|
|||
counting overwritten values from a specific field
TGMagro,
Add an integer field to your table, say, called DateChanges. Place a textbox on your form bound to the field. In the AfterUpdate event of the date field, increment the value: Me![txtDateChanges] = Me![txtDateChanges] + 1 Hope that helps. Sprinks "TGMagro" wrote: I'm trying to create a field that automatically counts the number of times a different field has been 'updated'. Specifically, the field being updated is a date field. The actual date does not need to be saved. How many times that date is changed, however, is important. I know I create a text field to capture this--can't seem to come up with the correct code, however, to do so. Can you help? Thanks. |
#4
|
|||
|
|||
counting overwritten values from a specific field
Sprinks,
I keep getting a message asking me to save the macro. Any ideas. I'm using an old version MSA2000. Thanks. "Sprinks" wrote: TGMagro, Add an integer field to your table, say, called DateChanges. Place a textbox on your form bound to the field. In the AfterUpdate event of the date field, increment the value: Me![txtDateChanges] = Me![txtDateChanges] + 1 Hope that helps. Sprinks "TGMagro" wrote: I'm trying to create a field that automatically counts the number of times a different field has been 'updated'. Specifically, the field being updated is a date field. The actual date does not need to be saved. How many times that date is changed, however, is important. I know I create a text field to capture this--can't seem to come up with the correct code, however, to do so. Can you help? Thanks. |
Thread Tools | |
Display Modes | |
|
|