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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
i need to add number in existing field when a form open
thanks to all i solved the problem
|
#5
|
|||
|
|||
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 | |
|
|