Results 1 to 3 of 3
  1. #1
    Numilex is offline Novice
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    2

    Generating a report for specific people

    Hey everyone, first post here.



    So I'm very new to Access and we I have a project in school that requires for me to make a database. It's a very simple one, it has 4 tables and 3 relationships.
    It's about a company that processes milk, and the database is about collecting the milk from the farmers. So I've made a couple forms to input the data and all, but now I'm stuck on reports.

    So what I want is that a user can select a farmer using a combo box, and press a button to display how much milk he has delivered in 1 month and calculate the total price. I'm wondering if this is possible using Access' builtin macros, or possibly using Visual Basic code.

    If you need more information to answer this question please let me know and I will answer them.

    Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    You need to:

    1. open report filtered to farmer selected in combobox - several methods to accomplish
    one is with parameterized query, review http://www.datapigtechnologies.com/f...mtoreport.html
    another is to pass filter to query with code (macro or VBA), VBA example: DoCmd.OpenReport "reportname", , , "FarmerID=" & Me.comboboxname
    if you want the report limited to a single year & month then include that as additional filter criteria

    2. design report to do calcs, use Grouping & Sorting features with summary calcs in footer section

    I presume one of the tables has a field for delivery date. The month and year can be extracted from that value: Year([DeliveryDate]), Month([DeliveryDate])

    Build a query that joins necessary tables, selecting required fields and constructing fields with those expressions to extract year and month. Use that query as basis for the above.

    Without knowing more about your table structure and relationships, can't be more specific. However, this really very basic Access functionality and Access Help has guidelines.
    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.

  3. #3
    Numilex is offline Novice
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    2
    Right, so what you just said is some very complicated stuff to me. But I'll try it out and report back with results. I probably can't include the database though, seeing as it is in Dutch and you probably will not understand.

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

Similar Threads

  1. Replies: 6
    Last Post: 08-22-2011, 06:52 PM
  2. Help on Generating a Report!
    By ETCallHome in forum Reports
    Replies: 10
    Last Post: 06-22-2011, 01:08 PM
  3. Report people grouped to years
    By gerhard_s in forum Reports
    Replies: 3
    Last Post: 10-01-2010, 07:59 AM
  4. Generating Report from Form
    By mwabbe in forum Reports
    Replies: 8
    Last Post: 08-30-2010, 12:25 PM
  5. Replies: 0
    Last Post: 12-28-2009, 12:14 PM

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