Re: how can I change all currency fields from positive to negative

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,
you can do this 2 ways:
- you can store always positive values, and then use query to change Credit Memo to negative - IIF([CreditMemo], -[Line1Item], [Line1Item]) as NewLine1Item. This query you can use to calculations, etc
- you can use form's BeforeUpdate event to change Line1Item:
if [CreditMemo] then
me.Line1Item= - ABS(me.[Line1Item])
else
me.Line1Item=ABS(me.[Line1Item])
end if


assuming that CreditMemo is some Boolean flag

--
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com



"Johnie Karr" <Johnie Karr@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:8542B9A3-1B3D-451F-890D-DC6DE9967D62@xxxxxxxxxxxxxxxx
I am creating an Invoice Application for a company. They need to select
Invoice or Credit Memo. If Credit Memo is selected it should change all
values to negative, if Invoice is selected it changes all values to positive.


I have made it change all exisiting data by using:
[code]
Me!Line1Item = -Me!Line1Item
[/code]
If the value is positive this will change it to negative, and if the value
is negative it will change it to positive.

2 Issues with this:
If the user manually changes that field, while Credit Memo is selected, it
will make it positive. Also, any non existant fields (ie. $0.00) are
neutral, so once edited will make them positive. Then you change Credit Memo
to Invoice and it changes the positves to negative.


There has to be a way to make the field negative, not the value of the
field. I don't know VBA, but I am using it for this program. PHP and MySQL
is where I normally develop.


Thanks,
Johnie Karr
Data Management Technologies
www.datamt.org

.



Relevant Pages

  • Re: how can I change all currency fields from positive to negative
    ... How about setting up the TransactionType field as a Number field, ... for Invoice; ... -1 for Credit Memo ... > Invoice or Credit Memo. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Query
    ... product that shows the sum of all invoice amounts for a selected month ... and the sum of all Credit amounts for that selected month and the net ... Sum query for Invoices and append for all products (selected by ...
    (microsoft.public.access.forms)
  • Re: how can I change all currency fields from positive to negative
    ... "Alex Dybenko" wrote: ... >>I am creating an Invoice Application for a company. ... >> Invoice or Credit Memo. ... If Credit Memo is selected it should change all ...
    (microsoft.public.access.modulesdaovba)
  • RE: Invoicing database design
    ... record as the invoice. ... the credit card table to the invoices table. ... invoice statement is a better choice of words the a/r ledger would be a great ... The query that I use now is ...
    (microsoft.public.access.tablesdbdesign)
  • RE: add an integer to Date the get Date?
    ... This is sooo simple;-) Add the credit term to the invoice date. ... Just create a query and link both tables through the existing CustomerID - what I expect there is or any other unique identifier. ...
    (microsoft.public.access.queries)