Results 1 to 7 of 7
  1. #1
    reysy28 is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2014
    Posts
    7

    Populate a table

    Click image for larger version. 

Name:	layout.jpg 
Views:	14 
Size:	84.3 KB 
ID:	18563


    With the above layout of my table and form my question is how can I populate the EnglishAppAnswer table, the idea is every picture has 4 buttons, the applicant choose a button to click then the answer will be added to the EnglishAppAnswer table with also the AppID, TestDate fields coming from AppDataFile and QuestionID from EnglishSkillsPics table. The EnglishSkillsPics has several questionaires so every time the Applicant choose an answer it will go to the next question from the EnglishSkillsPics table until all questions are finished. And is it possible to put a timer on this? Please help..... thanks a lot.....

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    One approach is to pre-create a set of records in the EnglishAppAnswer table for the applicant. Open form filtered to that set of records and code will save answer directly into record and advance to the next record when any button is clicked. This form RecordSource would be a query that joined EnglishAppAnswer to EnglishSkillsPics so the associated image and choices could be displayed.

    Another approach would use a form bound to EnglishSkillsPics table and use code to run INSERT action SQL to save record to EnglishAppAnswer table when button is clicked and advance to next question.

    I expect a timer is possible. Form has Timer event. Coding a timer is rather tricky.
    Last edited by June7; 11-01-2014 at 10:17 AM.
    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
    reysy28 is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2014
    Posts
    7
    Thanks June7, i'll try the second approach....

  4. #4
    reysy28 is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2014
    Posts
    7
    attached is my database... thanks sir....
    Attached Files Attached Files

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Suggest you make the form command buttons into toggle buttons or radio buttons in an OptionGroup control named optAns.

    You will need the user's AppID. How does Access know who is using?

    The APPEND query is not using values from the form and is adding data to the wrong table. I don't use macros - only VBA:

    CurrentDb.Execute "INSERT INTO EnglishAppAnswers(TestDate, AppID, QuestionID, AppAnswer) VALUES(Date()" & Me.AppID & ", " & Me.QuestionID & ", " & Me.optAns & ")"
    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.

  6. #6
    reysy28 is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2014
    Posts
    7
    Quote Originally Posted by June7 View Post
    Suggest you make the form command buttons into toggle buttons or radio buttons in an OptionGroup control named optAns.

    You will need the user's AppID. How does Access know who is using?

    The APPEND query is not using values from the form and is adding data to the wrong table. I don't use macros - only VBA:

    CurrentDb.Execute "INSERT INTO EnglishAppAnswers(TestDate, AppID, QuestionID, AppAnswer) VALUES(Date()" & Me.AppID & ", " & Me.QuestionID & ", " & Me.optAns & ")"

    Sorry am a newbie here, i dont even know VBA and where to put that.....

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    That would be code behind the suggested option group control.

    Or rebuild the query object correctly and stick with macro.
    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. Auto populate a table
    By keiath in forum Access
    Replies: 5
    Last Post: 02-16-2014, 01:56 PM
  2. Replies: 2
    Last Post: 06-09-2012, 03:16 PM
  3. Replies: 3
    Last Post: 10-09-2011, 08:55 AM
  4. Auto-populate from another table
    By Palladian1881 in forum Access
    Replies: 2
    Last Post: 08-16-2011, 11:29 AM
  5. Use form to populate a table from another table
    By sammer021486 in forum Forms
    Replies: 3
    Last Post: 09-28-2009, 09:06 AM

Tags for this Thread

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