Results 1 to 4 of 4
  1. #1
    csloss is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    2

    Design for multiple contacts with quarterly data collection and reporting

    I'm completely self-taught on Access and have done fairly well in making my rudimentary databases 'work' for me over the years. However...I am stumped on this current one, and have been trying to work it out for nearly a year now...I keep getting stuck and then give up!

    The details are as follows:

    I have a list of 200+ contacts (physicians) which whom I need to collect data on quarterly, and be able to run various reports on. To get me started in the right direction, at least...does the setup below look accurate, or am I grouping too much into each table?

    Table #1


    To get me started..I know I should have a "Contacts" Table. In the table, I have:
    • ID (Primary Key) (QUESTION: I could use their license # as my primary key instead, couldn't I? I'd like to have that number somewhere in their record anyway)
    • Last Name
    • First Name
    • Company
    • Email Address
    • Specialty (I was using Lookup Wizard to refer to a specified list of specialties)
    • Business Phone
    • Mobile Phone
    • Fax Number
    • Address
    • City
    • State
    • Zip
    • Notes
    • Attachments
    • Status (using Lookup Wizard to refer to one of two different current statuses)
    • Initial Appointment Date


    Table #2

    • Record ID (primary key)
    • MD_ID (relating to the specific MD from Table #1)
    • Quarter Start Date
    • Data Point #1
    • Data Point #2
    • etc. (~15-20 different questions/data points that are collected on each quarterly)



    ...after all of that is set up, I'd like to be able to set up my forms so that I can easily input the data, and then report out (1 page per physician, showing their data quarterly across the page so they can see their trending).

  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,618
    Might not be easy with that data structure.

    If Table2 were like:

    RecordID
    MD_ID
    QtrStart
    DataID
    DataValue

    Then you could do a CROSSTAB query that groups on MD_ID and DataID and pivots on the QtrStart.

    Can manipulate the table with a UNION query to get the data structured like that then run CROSSTAB on the UNION table. There is no wizard or designer for UNION, must type into the SQL View of query builder (limit of 50 lines).

    SELECT RecordID, MD_ID, QuarterStartDate, DataPoint1 AS DataValue, "DP1" AS Source FROM tablename
    UNION SELECT RecordID, MD_ID, QuarterStartDate, DataPoint2, "DP2" AS Source FROM tablename
    ...
    UNION SELECT RecordID, MD_ID, QuarterStartDate, DataPoint20, "DP20" AS Source FROM tablename;

    Alternative probably involves a lot of VBA code.


    BTW, recommend no spaces or special characters/punctuation (underscore is exception) in any names.
    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
    csloss is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    2
    Thanks, June!
    For DataID/DataValue .. I'm a little stuck there. Would I AutoNumber the DataID? Or would I have a third table that would reference to the DataID (i.e., #1 = Question #1, #2 = Question #2, etc.)?

    Quote Originally Posted by June7 View Post
    Might not be easy with that data structure.

    If Table2 were like:

    RecordID
    MD_ID
    QtrStart
    DataID
    DataValue

    Then you could do a CROSSTAB query that groups on MD_ID and DataID and pivots on the QtrStart.

    Can manipulate the table with a UNION query to get the data structured like that then run CROSSTAB on the UNION table. There is no wizard or designer for UNION, must type into the SQL View of query builder (limit of 50 lines).

    SELECT RecordID, MD_ID, QuarterStartDate, DataPoint1 AS DataValue, "DP1" AS Source FROM tablename
    UNION SELECT RecordID, MD_ID, QuarterStartDate, DataPoint2, "DP2" AS Source FROM tablename
    ...
    UNION SELECT RecordID, MD_ID, QuarterStartDate, DataPoint20, "DP20" AS Source FROM tablename;

    Alternative probably involves a lot of VBA code.


    BTW, recommend no spaces or special characters/punctuation (underscore is exception) in any names.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,618
    DataID would be a combobox to select the ID of data element. This means, yes, you need a third table of data elements and their ID. Or if the data element name is short, use it instead of a cryptic ID. That would eliminate the issues associated with lookups with alias.

    You might be able to emulate a CROSSTAB with your original data structure. Review: http://datapigtechnologies.com/flashfiles/crosstab.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: 5
    Last Post: 08-12-2013, 12:53 AM
  2. Replies: 1
    Last Post: 05-13-2013, 10:55 PM
  3. Mobile Reporting with Multiple Data Sources
    By ndallenaz in forum Import/Export Data
    Replies: 0
    Last Post: 02-15-2013, 08:09 PM
  4. Replies: 3
    Last Post: 11-16-2012, 10:15 AM
  5. Data collection
    By ROB in forum Access
    Replies: 2
    Last Post: 11-06-2010, 04:18 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