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  

i need to add number in existing field when a form open



 
 
Thread Tools Display Modes
  #1  
Old April 7th, 2010, 02:14 PM posted to microsoft.public.access.forms
Spier2vb
external usenet poster
 
Posts: 12
Default i need to add number in existing field when a form open

i need to add number in existing field when a form open

for example

when i open the form automatically add No. 1 and sum numbers in existing field

thanks
  #2  
Old April 7th, 2010, 03:09 PM posted to microsoft.public.access.forms
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default i need to add number in existing field when a form open

On Wed, 7 Apr 2010 06:14:01 -0700, Spier2vb
wrote:

I am not sure exactly what you mean, but perhaps the DSum function
would work for you? Look it up in the Help file. You can use it as the
ControlSource for a textbox:
=DSum(...)

-Tom.
Microsoft Access MVP


i need to add number in existing field when a form open

for example

when i open the form automatically add No. 1 and sum numbers in existing field

thanks

  #3  
Old April 8th, 2010, 04:49 PM posted to microsoft.public.access.forms
Larry Linson
external usenet poster
 
Posts: 3,112
Default i need to add number in existing field when a form open


"Spier2vb" wrote in message
...
i need to add number in existing field when a form open

for example

when i open the form automatically add No. 1 and sum numbers in existing
field

thanks


I agree with Tom that it's not "patently obvious to the casual observer"
what you want to do. I can see a couple of possible additional
interpretations:

(1) you are keeping track of the number of times the record has been
displayed, so whenever you open the form, you want to increment the value of
a field in the record. If this is the case, in the Form Load event, you can
include code to increment the control in which the field is displayed.

(2) you are keeping some kind of total, and want to enter a number, but add
it to an existing field in the record that is displayed. If this is the
case, add an unbound control to the form, enter the value you wish to add
and in the AfterUpdate or LostFocus event of the unbound control, add the
value of the unbound control to the control displaying the field, then clear
the unbound control.

If neither of those, if you'd clarify what it is you want, I'd wager someone
here could make a useful suggestion.

Larry Linson
Microsoft Office Access MVP



  #4  
Old April 13th, 2010, 12:59 PM posted to microsoft.public.access.forms
Spier2vb
external usenet poster
 
Posts: 12
Default i need to add number in existing field when a form open

thanks to all i solved the problem
  #5  
Old April 13th, 2010, 01:04 PM posted to microsoft.public.access.forms
Spier2vb
external usenet poster
 
Posts: 12
Default i need to add number in existing field when a form open

thank you everyone the problem was solved, and thak you KARL

"Larry Linson" wrote:


"Spier2vb" wrote in message
...
i need to add number in existing field when a form open

for example

when i open the form automatically add No. 1 and sum numbers in existing
field

thanks


I agree with Tom that it's not "patently obvious to the casual observer"
what you want to do. I can see a couple of possible additional
interpretations:

(1) you are keeping track of the number of times the record has been
displayed, so whenever you open the form, you want to increment the value of
a field in the record. If this is the case, in the Form Load event, you can
include code to increment the control in which the field is displayed.

(2) you are keeping some kind of total, and want to enter a number, but add
it to an existing field in the record that is displayed. If this is the
case, add an unbound control to the form, enter the value you wish to add
and in the AfterUpdate or LostFocus event of the unbound control, add the
value of the unbound control to the control displaying the field, then clear
the unbound control.

If neither of those, if you'd clarify what it is you want, I'd wager someone
here could make a useful suggestion.

Larry Linson
Microsoft Office Access MVP



.

 




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 04:45 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.