Results 1 to 12 of 12
  1. #1
    Paranap is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    30

    Viewing data from a query

    Hello

    I have a database with training records of staff of different bits of kit. I have created the user interface to input when they are doing training and that is all groovy. The trouble I'm having is viewing the data. I've got queries to interigate the data for instance I have a crosstab query with the training needs down the names of the staff across and the value showing the last time they did that training. How can I incorporate that into the user interface and what I'd really like to do is some conditional formatting to show if something is out of date.
    I'm sorry if this is a simple question but still learning access and this sort of thing I've not done before.

    Thank you

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,970
    It is not easy to build a stable report to run perpetually based on CROSSTAB because CROSSTAB fields can be so dynamic. Review http://allenbrowne.com/ser-67.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.

  3. #3
    Paranap is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    30
    Is there a way of displaying the data easily??

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,970
    Certainly, just not with a CROSSTAB.
    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. #5
    Paranap is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    30
    Ok if I want to show a list of training needs with the last time people have done it for a number of people how would I do it??

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,970
    What dataset are you basing the CROSSTAB on? Don't make it a CROSSTAB. Data will be vertically oriented.

    Since I don't know your data structure, hard to give specific guidance.
    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. #7
    Paranap is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    30
    Click image for larger version. 

Name:	Relationships.jpg 
Views:	12 
Size:	117.4 KB 
ID:	22456


    Here is my relationships. (Hope its attached properly) I need to be able to show lots of different data in a simple way which can be accessed from the user interface. The one I'm trying to do is show a list of the latest training for each training subject. I have a query that does that but want to show it in a better way. I thought a report would do that but they seem quite inflexible.

    Any help you can give is very much appreciated

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,970
    Still not sure what you want to show.

    If you want all training to be shown for each individual even if they haven't had that training, this requires a dataset of all possible combinations of training and people. This dataset can possibly be created by a query that includes tblTraining and tblOperative without a JOIN clause of course since they don't have a direct relationship. This results in a Cartesian relation of records - every record in each table will associate with every record of other table to show all possible combinations of training and operative.

    Then build another query joining that dataset to tblOperativeTraining by linking on both TrainingID and Payroll fields (not INNER JOIN, probably RIGHT JOIN).
    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. #9
    Paranap is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    30
    Hi This is kind of what I'm after. Some sort of visual display showing the users and what training they need to do and then the date they last did it and then the colouring system is to show if something is in date. I currently use a system like this in excel but needed to update it hence the access work. As I said I am fairly new to all this and learning as I go so I think the main issue I'm having is how to display my data from the user interface. I can create queries to show the data but its viewing it from the user interface.

    Thanks for your help
    Attached Thumbnails Attached Thumbnails excelexample.jpg  

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,970
    That representation of the data is a non-normalized structure - this manipulation can be done with a CROSSTAB query. However, as already stated, building a report so you can do the conditional color coding is often not easy with CROSSTAB. Did you review the link in post 2?

    If the CROSSTAB is designed to always generate the same fields, then simply use the query as the RecordSource of a report, bind textboxes to the fields and set Conditional Formatting.
    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. #11
    Paranap is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    30
    Yeah I think this may be my problem. The whole reason for going away from excel is that it makes it hard to change things. The Training titles although won't change much may change and the data will need to change with them. I've not really used reports. Do they not bind to the results of a query so if a query result changes the report will change too??

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,970
    Reports are bound to table or query. Yes, if data changes the records displayed will change. However, textboxes must be bound to field names that are in the RecordSource. Since fields of a CROSSTAB can be dynamic, the report will error if a field is no longer generated by the CROSSTAB. Means redesigning the report. Unless CROSSTAB is designed to ALWAYS generate the same fields.
    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. running query without viewing that
    By afshin in forum Queries
    Replies: 19
    Last Post: 01-19-2012, 11:29 AM
  2. Data updation & viewing
    By sachin.shelar in forum Forms
    Replies: 1
    Last Post: 10-30-2011, 01:53 AM
  3. Replies: 1
    Last Post: 02-20-2011, 08:42 PM
  4. Converting/Viewing OLE Data as String...
    By oldgem in forum Access
    Replies: 0
    Last Post: 09-12-2009, 06:35 PM
  5. Trouble viewing correct data
    By KevinH in forum Access
    Replies: 11
    Last Post: 07-06-2009, 07:16 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