Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 33
  1. #16
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239
    I have now created a new query with ALL fields required in the report. Currently the query is running without a hitch. However the fields will all not fit on one page hence I'd opted for tab control. Besides the tab control, do you have any suggestion as to how I can organised about 40 questions which will have answers from the query on one report?

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I was partially wrong about tab control on report. It does work in Report View, not in Print Preview (therefore not directly to printer). So if you want to print data, tab control is not useful.

    I have reports with more fields than can fit on width of page so I 'multi-line' the record.
    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. #18
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239
    thanks. multiline...where is that property?

  4. #19
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    It's not a property, it's just physically arranging the controls as multiple lines.
    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.

  5. #20
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239
    but the font will be tiny hm...

  6. #21
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Why tiny? Example:
    Click image for larger version. 

Name:	Capture.JPG 
Views:	4 
Size:	144.7 KB 
ID:	19066
    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.

  7. #22
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239
    hi but the above does not look organized to me.. If the Label(s) are in the page header, how would one know which control (in the detail section) belongs to which? Each query answers a question so I need to put the question as the label for the returned answer.. not sure if that's clear or not...?

    BTW I tried to create the report afresh using the wizard and when I specified all the fields from my 'new' (combined query), it could not create it. I got a message that there were too many fields. But I need all of them...

  8. #23
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Users get familiar with report. The first row of labels go with the first row of data. It was the best I could do for the request I was given.

    Put labels where you need them. This was just an example.

    Quite possibly this is not suitable for your data structure but I don't know your data structure.

    Tables are limited to 255 fields, I thought queries had the same limit but review http://support.microsoft.com/kb/199076
    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.

  9. #24
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239
    thanks June. It's my first time creating a Report of this nature and there's been plenty of learning curves for me. I went back to the previous report I created and made my combined query it's only record source. So now I have the tab control (haven't yet figured out how I will print it) and decided to manually drag and drop the fields onto the different tab pages...

  10. #25
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Can't print tab control. I already tested that. See post 17. Only the data from one tab will print and the tab control shows a partial outline.

    Maybe you need to do subreports.
    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.

  11. #26
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239
    oh yes subreports. I'm in a bit of a pickle June7 about some information that I need in my report. Basically, the query counts how many times each question was answerd Yes, No, etc but there is a field where the user can enter short comments on patient's condition which is not covered by the question. I thought to have a subreport which would 'list' everything in that column where the field is not Null. I tried it as a separate query and it worked but now that I have combined the queries, I don't know how to indicate this in the new query. Not sure if this is clear you or not...

    so far each column in my new recordsource counts something or has an aggregate function but this info that I need, will select data. Therefore where the others will produce one line of output, the SELECT will return more than one line. How do I do this since I can't use more than one object to create the report ?

  12. #27
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Since I don't know your data structure I can't really offer specifics.
    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. #28
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239

    Exclamation

    There are as many as 40 questions with this format:

    indicate patient's symptoms
    • Headache
    • Fever
    • nausea
    • other (specify)


    there's an input box beside the last option for the user to specify a symptom. My query therefore has 40 columns, each one representing a question. It would find out from the table, how many times a particular answer was given for a particular question. So basically it will count the records but in addition, I want to list user comments for a specific question. Since the user will enter whatever they choose, I can't use SUM or use an aggregate function on that table field. I can only apply SELECT [other] from mytable filter where the field is not empty.

    This will produce many rows. My question is "how can I represent his SELECT query with the aggregate function SUM on the other columns together?

  14. #29
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Doesn't sound like a normalized data structure.

    Can use First() or Last() aggregate function on text fields but that will not be useful here.

    So you do a total count of answers for each question and then want to also show all user comments for each question/answer?

    I expect this would be fairly easy if the data structure were normalized. If each answer was a record then report could be bound to count query and a subreport could have the related comment records.

    A UNION query can be used to manipulate non-normalized data into a normalized structure. Something like:

    SELECT RespondentID, AnswerField1 AS Answer, "Q1" AS Question FROM Answers
    UNI ON SELECT RespondentID, AnswerField2, "Q2" FROM Answers
    UNI ON SELECT RespondentID, AnswerField3, "Q3" FROM Answers;

    But I still don't know enough about your data structure - I have no idea where the comments you mentioned are located.

    Then UNION query can be used in subsequent queries - such as an aggregate Totals with Group By query.
    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.

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

    Exclamation

    no it isn't normalized. Please see illustration below:

    Q1
    indicate patient's symptoms

    • Headache
    • Fever
    • nausea
    • other (text box here)


    Q2
    why was corticosteroids not indicated?

    • due to allergy
    • responsive to B2
    • asthma
    • other reason (text box here)



    recordID patientSymptom OtherSymptom Corticosteroids OtherCortico
    21200 Nausea responsive to B2 patient was unconscious
    21201 Fever extreme weakness Asthma






    Query: column1
    Sum(IIf([patientsymptom]="Nausea",1,0))

    Query: column2
    SELECT [Othersymptom] WHERE Not IsNull([Othersymptom])


    Query: column3
    Sum(IIf([Corticosteroids]="due to allergy",1,0))


    Query: column4
    SELECT [OtherCortico] WHERE Not IsNull([OtherCortico])





Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Referencing Controls on and off a Tab
    By dccjr in forum Programming
    Replies: 2
    Last Post: 04-25-2013, 05:43 AM
  2. Referencing between Sub-reports.
    By michaelh93 in forum Reports
    Replies: 2
    Last Post: 01-15-2013, 06:28 PM
  3. Referencing values within queries
    By sf827 in forum Queries
    Replies: 9
    Last Post: 12-19-2011, 05:49 PM
  4. Referencing a Subroutine
    By Lockrin in forum Programming
    Replies: 1
    Last Post: 02-26-2010, 10:09 AM
  5. referencing each record
    By grgerhard in forum Forms
    Replies: 1
    Last Post: 11-11-2006, 08:15 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