Results 1 to 6 of 6
  1. #1
    cwwaicw311 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    75

    Query not displaying value


    Hi,

    I have 3 table:
    Staff (Staff ID(PK), Shift)
    Inventory (InventoryType(PK),ManchineName)
    Transaction (Transaction ID(PK), Date, InvIN, InvOUT, Remarks, Staff ID(FK), InventoryType(FK))

    Since i have 10 difference type of inventory, I wanted to create a query whereby for example :Inventory XYZ. So when i open the query it will display:
    InventoryType = XYX, InvIN, InvOUT so that i can calculate the balance.

    I not sure is it something wrong with my relationship or problem on normalization but the query does not return any value. Pls help, Thank...

  2. #2
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    If I understand what you want....I would create a simple one-to-one relationship between InventoryType(PK) and InventoryType(FK) within the query. Then add Inventory.InventoryType(PK), Transaction.InvIN, and Transaction.InvOUT in the query fields. That should give you what you are looking for. Let me know if that works.

  3. #3
    objNoob is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    21
    Quote Originally Posted by cwwaicw311 View Post
    Hi,

    I have 3 table:
    Staff (Staff ID(PK), Shift)
    Inventory (InventoryType(PK),ManchineName)
    Transaction (Transaction ID(PK), Date, InvIN, InvOUT, Remarks, Staff ID(FK), InventoryType(FK))

    Since i have 10 difference type of inventory, I wanted to create a query whereby for example :Inventory XYZ. So when i open the query it will display:
    InventoryType = XYX, InvIN, InvOUT so that i can calculate the balance.

    I not sure is it something wrong with my relationship or problem on normalization but the query does not return any value. Pls help, Thank...
    Code:
    SELECT inv.inventorytype, trans.invin, trans.inout
    FROM inventory as [inv], transaction as [trans]
    WHERE inv.inventorytype = trans.inventorytype;
    This would display your whole inventory. If you need to only find one type of inventory then add another condition to you WHERE clause like

    Code:
    WHERE inv.inventorytype = trans.inventorytype AND inv.inventorytype=WHAT_YOU_ONLY_WANT_TO_SEE

  4. #4
    cwwaicw311 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    75
    Hi,
    thank for the code i have done the query part. I have another question, would u guys know how to do running sum in a query. The table would be the same as i stated above.

    The running sum would SUM the value of InvIN MINUS InvOUT

    How do i do the running for this...??

  5. #5
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    I would just creater another Select Query based on your first query. Then add InvIn and InvOUT, then add a third field as an expression and type [InvIN]-[InvOUT], change it from a "Group By" to a "Sum". That should do the trick. Let me know if you need a better explanation.

  6. #6
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    Well as promised here is your mdb with minimum stock prompt.
    Changes made:
    1)Field Re-order level in inventory Table
    2)Tag Field in Inventory_Tracking Table.

    When you stock becomes = to < then re-order level on a particular transaction that transaction is taged and when you select the inventory in the main menu the transaction information is displayed. This will continue till your stock is less then or equal to re-order level. But as soon as the stock goes up and you select the inventory the taged trasaction is released.


    I was following your post you wanted to know how to do a running sum. well i have used a query which does the same. now think about adding a danger stock level which should be lower then re-order level and once it reaches that level an user cannot make an more issue of that inventory.

    let me know about your progress.

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

Similar Threads

  1. Displaying Value and not ID
    By jonny in forum Access
    Replies: 3
    Last Post: 10-19-2009, 08:21 AM
  2. Displaying Time Only
    By Corinne in forum Access
    Replies: 5
    Last Post: 06-24-2009, 09:45 PM
  3. Displaying Query Properties in a Form
    By Bjar in forum Programming
    Replies: 1
    Last Post: 07-16-2008, 07:51 AM
  4. Displaying a PDF in a Form
    By Chaz in forum Forms
    Replies: 0
    Last Post: 08-07-2006, 03:26 PM
  5. Form field not displaying in query
    By Valeda in forum Queries
    Replies: 2
    Last Post: 05-05-2006, 10:08 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