Results 1 to 3 of 3
  1. #1
    gazzieh is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    26

    Crosstab not accepted as subform

    I have a set of data I want to display as a matrix.

    Along the top are three column headings (P, M, D).


    In the first column are the row references, which are numbers 1 to 10.
    Where these row and column references cross is a lot of text.

    Basically I can then identify P1, M3, D5 etc (battleships in a way).

    I have created this as a crosstab query with no issues.

    The key field for this query is set as unit_id (NOT used in the actual crosstab table but I can set this to, say, 44 and the table shows the results for course 44).

    I have a form that lists all the courses and has the key field unit_id.

    If I try to embed the query into the form the system proposes connecting unit_id to unit_id but then says it is not in the query. If I set to define my own I find that, sure enough, the unit_id query is not showing - though it IS in the query.

    What can I do to connect the form to the crosstab query using the key field unit_id?

  2. #2
    Rod is offline Expert
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Location
    Metro Manila, Philippines
    Posts
    679
    Perhaps it's not possible to use Access Master/Child Fields linking in this situation. I don't know and neither does anyone else judging by the time this post has been unanswered.

    You probably have to resort to using VBA to synchronise your subform. If you want help with that publish your crosstab SQL and give us the name of the control on the master (parent) form that contains the unit_id value. We can then use your names in any response.

  3. #3
    gazzieh is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    26
    Actually I solved this a little while ago. I had to use the Column Headings property and then could define the relevant hidden row value. This then allowed the query itself to be used as a subform - viewable as a datasheet.

    I now need to use VBA to tidy up the view but that part is easy!

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

Similar Threads

  1. Crosstab issue
    By teedee in forum Queries
    Replies: 5
    Last Post: 02-07-2011, 10:49 AM
  2. Crosstab Query Bug
    By goodguy in forum Queries
    Replies: 19
    Last Post: 02-03-2011, 01:41 PM
  3. Crosstab Query Help
    By ksmith in forum Programming
    Replies: 7
    Last Post: 12-01-2010, 07:00 AM
  4. Crosstab example
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-24-2010, 12:07 AM
  5. Crosstab: Sum of Columns over Row
    By tommaccoy in forum Queries
    Replies: 0
    Last Post: 12-03-2008, 05:26 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
  •  
Other Forums: Microsoft Office Forums