A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

counting overwritten values from a specific field



 
 
Thread Tools Display Modes
  #1  
Old December 1st, 2006, 03:48 PM posted to microsoft.public.access.forms
TGMagro
external usenet poster
 
Posts: 2
Default 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  
Old December 1st, 2006, 05:48 PM posted to microsoft.public.access.forms
Al Campagna
external usenet poster
 
Posts: 421
Default 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  
Old December 1st, 2006, 05:51 PM posted to microsoft.public.access.forms
Sprinks
external usenet poster
 
Posts: 531
Default 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  
Old December 15th, 2006, 07:59 PM posted to microsoft.public.access.forms
TGMagro
external usenet poster
 
Posts: 2
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:25 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.