Results 1 to 4 of 4
  1. #1
    x85712 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    2

    Categorize Records By Tasking Number


    I currently have a table with fields for "project name," tasking number and due date. Since we often issue multiple projects under a single tasking number, we have 400 different "project names" with about 70 different project numbers. What I am trying to accomplish is the following:
    -generate a report where the "project names" are categorized by the tasking number, i.e., display the number "1" on the left side & all the projects associated with that (only displaying "1" once), followed by "2" and all its projects, etc.
    -create a form whereby a user can select a tasking number from a combo box, and generate a report dynamically showing all projects associated with that tasking number. The combo box should only show each number once, right now it shows each number as many times as it appears in the main table, which for some can be 5 or 10 times.

    Thanks in advance!

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    The report is easy enough to do. With respect to the combo box, you would create a query on the main table and include the tasking number and set the unique property of the query to yes. In terms of SQL text it would look like this

    SELECT DISTINCT [tasking number]
    FROM [table name]

    By the way, do you only have 1 table? If a tasking number can have many related projects, that describes a one-to-many relationship, which by normalization rules, requires two related tables

    tblTaskingNumbers
    -pkTaskingNumberID primary key, autonumber
    -TaskingNumber

    tblProjects
    -pkProjectID primary key, auotnumber
    -fkTaskingNumberID foreign key to tblTaskingNumbers
    -txtProjectName

  3. #3
    x85712 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    2
    Thanks for the reply. I've got the query/combo box part knocked out.
    I originally created the main table as one table, but it's still easy enough to split it up. Once that is done, assuming I'm still using tblTaskingNumbers and tblProjects, what's the best way to display a report with all open projects, but only display the tasking number once?

    JG

  4. #4
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You would set up a query that brings the appropriate tables together and base the report on that query. Then in the report you would setup a grouping level on the tasking number and display that in the group header.

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

Similar Threads

  1. Limit number of records in report
    By aksnell in forum Reports
    Replies: 3
    Last Post: 12-05-2011, 02:31 PM
  2. Categorize records
    By lizzywu in forum Access
    Replies: 4
    Last Post: 10-13-2011, 11:11 AM
  3. Replies: 6
    Last Post: 07-25-2011, 01:54 PM
  4. The number of records in a query
    By Persist in forum Programming
    Replies: 3
    Last Post: 07-13-2010, 06:23 AM
  5. Number of Records Found by a Query?
    By Xiaoding in forum Queries
    Replies: 3
    Last Post: 03-05-2010, 03:34 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