Displaying Data

H

Henry N.

Hi there.
I've got a form with three fields. A, B, and C.
All data in fild C displays negative values eg. (-2,000.00)
What I would like to do is to display the same value but as possitive
(2,000.00)
in fild A in the following record.
Thank you
Henry N.
 
A

Allen Browne

Are the occasions when A should *not* show the same value as C?

NO: You must not store A. Remove the field from your table.
Then create a query into this table, and type this into the field row:
A: -[C]
Use the query anywhere you would have used your table.

YES: Use the AfterUpdate event procedure of the text box on your form where
C is entered to assign the value to A:
Private Sub C_AfterUpdate()
Me.[A] = - Me.[C]
End Sub

More info:
Calculated fields
at:
http://allenbrowne.com/casu-14.html
 
D

David Lloyd

Henry:

The following KB article shows how to copy information from the previous
form record to the current record. This copies the data to the same field
in the current record. You could adjust this slightly to copy the data from
Field C to Field A and change the sign.

http://support.microsoft.com/default.aspx?scid=kb;en-us;210236

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Hi there.
I've got a form with three fields. A, B, and C.
All data in fild C displays negative values eg. (-2,000.00)
What I would like to do is to display the same value but as possitive
(2,000.00)
in fild A in the following record.
Thank you
Henry N.
 
H

Henry N.

Hi,
This formula enabled to show the value from field C in the same record.
What I'm after is to display in field A of a record the value from field C
from previous record
Thank you.
Henry

Allen Browne said:
Are the occasions when A should *not* show the same value as C?

NO: You must not store A. Remove the field from your table.
Then create a query into this table, and type this into the field row:
A: -[C]
Use the query anywhere you would have used your table.

YES: Use the AfterUpdate event procedure of the text box on your form where
C is entered to assign the value to A:
Private Sub C_AfterUpdate()
Me.[A] = - Me.[C]
End Sub

More info:
Calculated fields
at:
http://allenbrowne.com/casu-14.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Henry N. said:
Hi there.
I've got a form with three fields. A, B, and C.
All data in fild C displays negative values eg. (-2,000.00)
What I would like to do is to display the same value but as possitive
(2,000.00)
in fild A in the following record.
Thank you
Henry N.
 
A

Allen Browne

See:
Referring to a Field in the Previous Record or Next Record
at:
http://support.microsoft.com/default.aspx?scid=kb;en-us;210504

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Henry N. said:
Hi,
This formula enabled to show the value from field C in the same record.
What I'm after is to display in field A of a record the value from field C
from previous record
Thank you.
Henry

Allen Browne said:
Are the occasions when A should *not* show the same value as C?

NO: You must not store A. Remove the field from your table.
Then create a query into this table, and type this into the field row:
A: -[C]
Use the query anywhere you would have used your table.

YES: Use the AfterUpdate event procedure of the text box on your form
where
C is entered to assign the value to A:
Private Sub C_AfterUpdate()
Me.[A] = - Me.[C]
End Sub

More info:
Calculated fields
at:
http://allenbrowne.com/casu-14.html

Henry N. said:
Hi there.
I've got a form with three fields. A, B, and C.
All data in fild C displays negative values eg. (-2,000.00)
What I would like to do is to display the same value but as possitive
(2,000.00)
in fild A in the following record.
Thank you
Henry N.
 
Top