Results 1 to 4 of 4

Create a report that dynamically adapts to a crosstab query.

  1. #1
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,084

    Create a report that dynamically adapts to a crosstab query.

    This came up in another thread so I'm posting an example database here so we don't end up hijacking that thread.



    This example database uses unbound textboxes and 'blank' labels and some VBA code in the ON OPEN event of the report to dynamically fill in columns of data.

    The example is limited to five columns of data OTHER than the row headers.

    CrosstabReportExample.zip

  2. #2
    amalfatima is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Mar 2015
    Posts
    2

    A

    Does anyone have sample database for patients and their lab reports ???






    _____________________











    amal

    Last edited by amalfatima; 03-15-2015 at 09:16 PM. Reason: a

  3. #3
    AYorkii is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2017
    Posts
    1
    I'm not so sure that I understand what this dynamic crosstab query does. I opened the report and the query and not sure what I'm looking for. What's unique about this file?

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,084
    Look at the design view of the report, most of the fields are unbound. They control source of the fields is determined when the report is run. This allows you to have dynamic column headers instead of creating a crosstab query and hard coding the column names. In the example database if you added a category and some data in the table tblTest, the report would not have to be altered at all. The only limit would be the number of columns defined in the report.

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

Similar Threads

  1. Replies: 1
    Last Post: 07-17-2013, 01:34 PM
  2. Replies: 37
    Last Post: 01-29-2013, 09:50 AM
  3. Replies: 5
    Last Post: 12-04-2012, 01:46 AM
  4. Setting crosstab headings dynamically
    By dougie in forum Queries
    Replies: 3
    Last Post: 01-18-2012, 11:47 AM
  5. Replies: 1
    Last Post: 08-13-2010, 12:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums