Page 1 of 2 12 LastLast
Results 1 to 15 of 28
  1. #1
    sps is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2023
    Posts
    12

    Need a query to get data in access form

    i have a table 1 attached and want data in access form like table 2 attached



    Where RollNo is unique
    and i want 1 student per form

    i attached da access file

    regards
    Attached Thumbnails Attached Thumbnails table1.jpg   table2.jpg  
    Attached Files Attached Files
    Last edited by sps; 07-11-2023 at 02:25 AM.

  2. #2
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044
    you can design a form for students with a subform based on a crosstab query. Be aware that you can view data this way, but won't be able to alter them.

  3. #3
    sps is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2023
    Posts
    12
    Can you tell more about it, access file attached, I will be grateful for your help.

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    Hi
    Your query would be along these lines:-

    TRANSFORM Sum(exam.[Marks]) AS SumOfMarks
    SELECT exam.[Subject], Sum(exam.[Marks]) AS [Total Of Marks]
    FROM exam
    GROUP BY exam.[Subject]
    PIVOT exam.[ExamType];
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  6. #6
    sps is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2023
    Posts
    12
    Quote Originally Posted by mike60smart View Post
    Hi
    Your query would be along these lines:-

    TRANSFORM Sum(exam.[Marks]) AS SumOfMarks
    SELECT exam.[Subject], Sum(exam.[Marks]) AS [Total Of Marks]
    FROM exam
    GROUP BY exam.[Subject]
    PIVOT exam.[ExamType];
    thanks I did the query but how I get the data in access form along with RollNo
    I NEED ALL SUBJECTS FOR SAME ROLLNO ON SAME FORM LIKE ATTACHED TABLE2

  7. #7
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    Hi
    The Form that opens is based on the original Crosstab query. I added the field "RollNo" to the query.

    The Format of the Form is now a Split Form
    In the header of the Form is an Unbound Control which allows you to enter the RollNo required.
    Once you have entered the Roll No - Tab out of the Control and the Records will be filtered to the required RollNo.
    Press the Clear Button to display all records.
    Attached Files Attached Files
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  8. #8
    sps is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2023
    Posts
    12
    Click image for larger version. 

Name:	r card.jpg 
Views:	38 
Size:	86.8 KB 
ID:	50485
    thanks for your help. basically I want result card like attached table(result card) for all students

  9. #9
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    Hi
    Without seeing your database it would be impossible for us to make a guess as to your table structures.
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  10. #10
    sps is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2023
    Posts
    12
    Quote Originally Posted by mike60smart View Post
    Hi
    Without seeing your database it would be impossible for us to make a guess as to your table structures.
    database file is attached

  11. #11
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    No database attached
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  12. #12
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by mike60smart View Post
    No database attached
    O/P put it in their initial post Mike. Confusing I know.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  13. #13
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    Hi WGM

    Yes i got his original database but his last request was to produce details of Students Exam Results.
    His original database does not include this data so was asking for the additional tables to be included.
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  14. #14
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by mike60smart View Post
    Hi WGM

    Yes i got his original database but his last request was to produce details of Students Exam Results.
    His original database does not include this data so was asking for the additional tables to be included.
    OK, my mistake. Sorry.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  15. #15
    sps is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2023
    Posts
    12
    any chance??

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

Similar Threads

  1. Replies: 2
    Last Post: 01-12-2017, 10:35 AM
  2. Replies: 1
    Last Post: 06-03-2016, 08:23 PM
  3. Replies: 4
    Last Post: 11-10-2014, 09:47 AM
  4. Replies: 7
    Last Post: 07-07-2013, 11:11 AM
  5. Replies: 1
    Last Post: 07-01-2013, 09:46 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