Prev: Combo Boxes-Access 2007
Next: Form display
From: Spier2vb on 7 Apr 2010 09:14 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
From: Tom van Stiphout on 7 Apr 2010 10:09 On Wed, 7 Apr 2010 06:14:01 -0700, Spier2vb <Spier2vb(a)discussions.microsoft.com> 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
From: Larry Linson on 8 Apr 2010 11:49 "Spier2vb" <Spier2vb(a)discussions.microsoft.com> wrote in message news:0420BCDD-C8C4-4D18-91F4-84ED08FDFA2B(a)microsoft.com... >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
From: Spier2vb on 13 Apr 2010 07:59 thanks to all i solved the problem
From: Spier2vb on 13 Apr 2010 08:04 thank you everyone the problem was solved, and thak you KARL "Larry Linson" wrote: > > "Spier2vb" <Spier2vb(a)discussions.microsoft.com> wrote in message > news:0420BCDD-C8C4-4D18-91F4-84ED08FDFA2B(a)microsoft.com... > >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 > > > > . >
|
Pages: 1 Prev: Combo Boxes-Access 2007 Next: Form display |