Results 1 to 2 of 2
  1. #1
    kctxucop08 is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    3

    Trouble with Expression

    I am working on an inventory database needed for medication samples for an indigent clinic. I am new to Access and know my limits so I did begin with a template.


    I would like to be able to maintain a perpetual intentory. There are several transactions that are possible and I have a table which reflects this (samples, sample distribution, original balance, expired meds). Where I have run into trouble is that I need to distinguish between the quantity of the transaction and the actual quantity which affects our inventory. For example, expired meds may be a quantity of 7, but the actual quantity for our inventory is -7. I do not know how to write an expression that expresses each transaction.

    So far I've got, which is not yielding a quantity:
    Actual Quantity: IIf([Transaction Types].[Add/Remove]="Addition",[Inventory Transactions]!Quantity,-([Inventory Transactions]!Quantity))

    Any further help in the right direction would be much appreciated.

  2. #2
    goodguy is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Location
    Zanzibar, Tanzania
    Posts
    229
    Quote Originally Posted by kctxucop08 View Post
    I am working on an inventory database needed for medication samples for an indigent clinic. I am new to Access and know my limits so I did begin with a template.
    I would like to be able to maintain a perpetual intentory. There are several transactions that are possible and I have a table which reflects this (samples, sample distribution, original balance, expired meds). Where I have run into trouble is that I need to distinguish between the quantity of the transaction and the actual quantity which affects our inventory. For example, expired meds may be a quantity of 7, but the actual quantity for our inventory is -7. I do not know how to write an expression that expresses each transaction.

    So far I've got, which is not yielding a quantity:
    Actual Quantity: IIf([Transaction Types].[Add/Remove]="Addition",[Inventory Transactions]!Quantity,-([Inventory Transactions]!Quantity))

    Any further help in the right direction would be much appreciated.
    #What are you getting? From what I see above, you are subtracting the same field from itself and to make matters worse, you have a redundant comma in it.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Having trouble with autofill
    By Kerrydunk in forum Forms
    Replies: 1
    Last Post: 04-25-2011, 11:26 PM
  2. Having trouble with Next Number
    By WyzrdX in forum Programming
    Replies: 2
    Last Post: 12-17-2010, 12:17 PM
  3. Trouble with (R)
    By NOTLguy in forum Access
    Replies: 3
    Last Post: 10-29-2010, 11:55 AM
  4. Iff trouble
    By JackT in forum Access
    Replies: 3
    Last Post: 08-18-2010, 02:28 PM
  5. Expression trouble
    By ROB in forum Access
    Replies: 2
    Last Post: 06-08-2010, 09:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums