Results 1 to 11 of 11
  1. #1
    clownfish1980m is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2015
    Location
    San Antonio TX
    Posts
    9

    Talking Exam Creator Answer Sheet

    I have creating a simple exam creating program with the following fields
    Section
    Answer1
    Answer2
    Answer3
    Answer4
    Picture
    Picture2
    Picture3
    Source
    Right Answer

    I crated a query which randomly selects the questions and output 50 exam questions.
    This works great.
    The report has all the field except Source and Right Answer.
    What I want to do to make it easy to grade the exam by creating an answer sheet. I tried to add the fields in the report footer, the page footer and it does not work. Putting it in the details only shows the employee the source and answer. Does anyone know how this could be accomplished?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    49,515
    Provide your db for analysis. Follow instructions at bottom of my post.
    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
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    1,473
    Is your db shared with all users having their own local front-end and the backend on the LAN? Or is it an all-in-one with tables and all the other objects in the same file?

    In any case you could add the two fields in the detail section as there is where they belong, make them hidden by default (Visible =False) then add code to the OnFormat event of the Detail section (note that event doesn't run in Report view, only Print or Print Preview) report to turn them visible for certain users:

    Code:
    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If Environ("USERNAME")="YourWindowsLogon" then
           me.txtSource.Visible = True
           me.txtRightAnswer.Visible = True
    End If
    End Sub
    Or you could create a VBA custom function to return the username and add that to the reports record source then use conditional to change the font color to be different for your own Windows logon but to match the backcolor for everybody else.

    Code:
    Public Function sUserName() as String
         sUserName=Environ("USERNAME")
    End Function
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    clownfish1980m is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2015
    Location
    San Antonio TX
    Posts
    9
    The database is a stand alone database. The intent is when it s time to competency assess the tech, we will print off the exam and give it to them. Once they are completed it it to be returned to me for grading. What I want to do is have the exam, when printed, also have the answer sheet as the last page so I can use it to grade the exam.

  5. #5
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    1,473
    Then just put the answer sheet in a subreport embedded in the main report's footer and keep it after you print.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  6. #6
    clownfish1980m is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2015
    Location
    San Antonio TX
    Posts
    9
    I tried to do what you what you suggested and that would work if my database was little, but with a database having over 200 quesitons, i don't want to print off the same answer sheet over and over. I need a way to link the ansersheet to the questions asked on the exam only. I have the question ID as the promary key. I wonder if theres is a way to link the data to the report form so that the qeustions asked on the exam will appers in the subreport form.

  7. #7
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    7,124
    Sounds like you have a table for questions, a table for answers where the question id is paired with the answer record. Then you need a junction table to relate the examinee id and the ids of the questions asked (or an exam details table with a record for each question chosen). You can link this table to the answers table and get only the answers to the questions asked.

    BTW, if you really have a field for each question or answer as you indicated, that design is wrong. It is not properly normalized.
    Last edited by Micron; 06-24-2020 at 09:29 AM. Reason: added comment
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    "Everyone has a photographic memory; some just don't have film." Steven Wright

  8. #8
    clownfish1980m is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2015
    Location
    San Antonio TX
    Posts
    9
    It's a flat table database. the fileds are all on the same table. The only filed linked to a different table is the Section field. The Answer sheet is generated through a query of the main table to only show the question ID, right anser and source, sorted ascending on question ID field. Questions that do not have anything in them do not appear when printed. It does give the employee room to write in a response. I can add a sub report but it shows all the answers to the questions in the entire database. What I need to have is the ability to create a sup report with only answers to the questions appearing on the generated exam. The questions are selected randomly, returning 50 questions. What I want to do is have the answer sheet show the answers in the same order as the exam. This makes it easy to grade the exam.

  9. #9
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    1,473
    Use the same report record source (the randomizing query) and sort in the subreport as in the main report. Basically make a copy of the existing report, ass the source and answer fields to the detail section, save it then use that as the subreport's source object.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  10. #10
    clownfish1980m is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2015
    Location
    San Antonio TX
    Posts
    9
    I feel I am so close and just a matter of a setting away. I created a copy of the exam report, brought it in as a sub form on the main exam. Deleted fields that I did not need which left the question ID, right answer, and the source. The entire database answers apper. I tried to change the master and slave to be based on the question ID. This does not work and it keeps asking for the ID. The Source Object is the copy of the Exam.

  11. #11
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    1,473
    If both copies are set to have the exact same record source (you mentioned a query that gives you 50 random questions with the same sorting then you don't need to link them. The sub-report should be embedded in the main report's footer.
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. Replies: 3
    Last Post: 12-15-2018, 05:35 PM
  2. IDBE Ribbon Creator - help!
    By redekopp in forum Access
    Replies: 0
    Last Post: 04-25-2016, 09:48 AM
  3. RPG Character Creator Databaase
    By Kragen in forum Database Design
    Replies: 1
    Last Post: 02-20-2016, 07:09 PM
  4. Ribbon Creator or equivalent result...
    By shane201980 in forum Programming
    Replies: 4
    Last Post: 10-30-2012, 05:32 PM
  5. ODBC Creator automatically
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-24-2010, 12:15 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 - Senior Forums