Page 1 of 2 12 LastLast
Results 1 to 15 of 29
  1. #1
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239

    Table Analysis

    I want to throw this one out there...



    My form has about 50 option group controls and now that it has been used to enter hundreds of records, the stakeholder wants me to "find out" how many "Yes"s and how many "No"s occurred for each option group in the table. This request also applies to the non option group controls i.e. checkboxes. How many times each one was checked and how many times each one was not checked)

    Is there a smart way of going about this please?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Can you show us some sample data or post a copy of your db? Why are you using 64 bit Access?

    You must have stored data in the related tables - can you tell from your saved records?

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    You need a table that has all the 'options' and their choices.
    if 1 option grp is:

    gender option
    -------
    boy
    girl
    unk

    you need a lookup table tOptGrps, that has:
    [optChoice],[optGrp]
    boy,gender
    girl, gender
    unk,gender
    smoke, smoking
    non-smoke, smoking


    when you have all the questions stored, then run it agains the data values that were picked,
    join the tData table with tOptGrps and count the choices picked.

  4. #4
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239

    Exclamation Table Analysis

    Hello, thanks for your response. Please find attached, a stripped down version. I actually have more than fifty questions that require an answer.
    Thanks much.
    Attached Files Attached Files

  5. #5
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239
    Thanks ranman. I am trying to understand your suggestions though they are not clear. The thought of manually creating the table(s) makes me shudder. I have about 10 other tables to do the same thing for.

    I could start by exporting the table...

  6. #6
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239
    hey Orange, just seen your note. I am using Access 2010 32 bit. Not sure how I came about the 64bit label

  7. #7
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    The way your tables are designed, youd need a table of the questions you want pulled (analysed) that looks like
    Tbl FieldName
    Paediatrics DiltdPupl
    Paediatrics UnreactPupl
    Paediatrics CushingRf
    PostCare Hypotherm
    PostCare IntubMechVent
    PostCare paraHypoth
    PostCare paraIntub

    Then EITHER ,

    build a macro, (easiest) (no table above needed)
    this macro would have lots of queries, ...an append query for EACH one of these fields to count and put the results to a 'reporting' table.
    OR
    some code that would scan this list and query the TBL for the counts in a date range. (difficult if you dont know VB)

  8. #8
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239
    thank you for this ranman. My VB skills are not advanced yet so I'm looking for the simplest solution to this issue.

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    You just want to tally the Yes/No data and summarize by some category values - how many? I expect can be done with queries, probably will involve long calc expressions.

    This is not a normalized data structure and will likely cause you much frustration.

    Advise not to use spaces and special characters/punctuation (underscore is exception) in naming convention. Instead of Tocolytic? better would be IsTocolytic.
    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.

  10. #10
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239
    hey June7, I've been away and only just returned. Thanks for your feedback. Frustration? sounds familiar. Way I see it, I reckon tis a small price to pay for the table being unNormalised. I'll look into fixing the special characters.

    First, without using a query, how do I get a column to receive the difference between two Date/Time columns? The data in these two columns are FirstTime and LastTime? Could you advise please?

    Thanks

  11. #11
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239
    I added a text box control to my form to calculate the difference between these two and also added a new column to the table but how do I populate this new column with the difference for existing records? I also have table validation rule: [spentTime] = [lastTime] - [firstTime] and bound the new column to [spentTime]

    Sorry I know this is basic but having been away, it is taking me a bit longer to 'get back into things'

  12. #12
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Options are:

    1. don't save, calculate when needed

    2. vba code

    3. since you have 2010, calculated field in table

    Review: http://allenbrowne.com/casu-14.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.

  13. #13
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239
    Thank you June7 . I'm reading up the links you provided.

  14. #14
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239
    Okay, I put this code in the Query row

    Minutes: DateDiff("n",[firstTime],[lastTime])


    but I'm getting error: Syntax error (comma) in query expression 'Coronary.[DateDiff("n",[firstTime],[lastTime])]'

    what could possibly be wrong with this syntax now...?


  15. #15
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239

    Question

    Oh dear, this don't look right!

    I changed the syntax to: Minutes: 'Coronary.[DateDiff("n",[firstTime],[lastTime])]'
    and got this:
    Minutes
    Coronary.[DateDiff("n",[firstTime],[lastTime])]
    Coronary.[DateDiff("n",[firstTime],[lastTime])]
    Coronary.[DateDiff("n",[firstTime],[lastTime])]
    Coronary.[DateDiff("n",[firstTime],[lastTime])]
    Coronary.[DateDiff("n",[firstTime],[lastTime])]
    Coronary.[DateDiff("n",[firstTime],[lastTime])]
    Coronary.[DateDiff("n",[firstTime],[lastTime])]

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Cash Flow Analysis
    By cbh35711 in forum Access
    Replies: 15
    Last Post: 09-09-2014, 12:11 PM
  2. Tricky Analysis??
    By stumped in forum Queries
    Replies: 2
    Last Post: 09-13-2012, 01:59 AM
  3. Data Analysis Direction
    By canyon289 in forum Access
    Replies: 6
    Last Post: 03-05-2012, 11:51 PM
  4. Table Data Analysis
    By bdf48 in forum Programming
    Replies: 1
    Last Post: 12-01-2011, 02:21 PM
  5. Need Help with Queries-Trade Analysis
    By nybanshee in forum Queries
    Replies: 0
    Last Post: 03-08-2008, 11:50 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