Results 1 to 5 of 5
  1. #1
    Banniskirk is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    4

    Access Reporting using Field Values as X and Y axis values

    Good day,

    While I have some experience with VBA programming in Excel I am fairly new to VBA and SQL in Access.

    I am putting together a Access based tool to monitor inventory of product sold across a network of stores.

    I am using VBA to automatically imports daily data into a simple table (one table per product) with the following fields (I changed the names to make it easier to follow):

    [NumKey] [Date] [Productname] [Storenumber] [Inventory]

    I need to output the data into a report/table that uses the recent dates as the X-axis values and the Storenumbers on the Y-axis with the table being populated with the inventory quantities.



    I would imagine there is a way to do this with SQL but I have no idea how. The only way I would know how to this would be to use variables VBA to create the report in Excel cell by cell.

    Any help/suggestions would be appreciated!

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,979
    I'm confused reading this.
    Do you want an Access report containing a chart or do you want it to have a table your data?
    Or do you want to do this in Excel?
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    Banniskirk is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    4
    Here is a simplified mockup of what the ACCESS table data looks like:

    Click image for larger version. 

Name:	Access table.jpg 
Views:	9 
Size:	179.6 KB 
ID:	32085

    and here is what the data needs to look like to be readable by the analysts:

    Click image for larger version. 

Name:	Output table.jpg 
Views:	9 
Size:	52.8 KB 
ID:	32086

    Ideally I am looking for a way to do this in ACCESS.

  4. #4
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    one table per product
    Before you go any further - don't do it that way, it is poor database design (and will lead to other problems down the road). Use one table for all the data, and since the product name is in the data records, you can filter it as required. This way you can easily make one chart for multiple products (e.g. WidgetA and WidgetB and WidgetC combined). With one table per product that would be a major headache, as would all sorts of other manipulations you might want to do with the data.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Your desired output looks like the result of a CROSSTAB query.

    I agree should not be a table for each product. Have 1 table and apply filter criteria as needed.

    Review http://allenbrowne.com/AppInventory.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 13
    Last Post: 09-29-2017, 11:53 AM
  2. Replies: 18
    Last Post: 03-26-2015, 07:26 AM
  3. Replies: 2
    Last Post: 11-29-2013, 12:13 PM
  4. Replies: 2
    Last Post: 07-02-2013, 12:18 AM
  5. Scatter Chart not Showing X-axis Values
    By ward0749 in forum Forms
    Replies: 4
    Last Post: 03-20-2012, 06:37 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