Results 1 to 6 of 6
  1. #1
    cptNemo is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    10

    Linked forms

    Hello,

    I am designing a form to enter data collected with a questionnaire and I am trying to do it with Access 2010.

    The database is divided in 8 tables, one for each section of the questionnaire. The first field of each table is the ID that, when the table will start to be filled, is suppose to be the same across all the tables. The ID field of each table is related (one-to-one) to the ID field of the first table.

    So far so good.



    I have now designed 8 forms, one for each table, and I am trying to link them. Ideally, I would like to have the user to open the blank Form 1, enter the ID which he/she chooses, enter the data in the form, move to Form 2, and find automatically in the ID field (from table 2) the exact value enter as ID in the first form, and so on with all the forms.

    How can I do it?

    Thanks!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Use form/subform arrangement.

    Why split out to 8 tables? Are the responses T/F, number, essay?

    Consider:

    tblRespondents
    ID (primary key)
    Name
    etc

    tblQuestions
    QuestionID (primary key)
    Question

    tblResponses
    RespondentID (foreign key)
    QuestionID (foreign key)
    Response
    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
    cptNemo is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    10
    I have 150 questions in the questionnaire, keeping one table I had continuously the error "Too many field defined". The tables are big and I am not really up to change them again. Is there any easy way to have the value being copied from you form to the other?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    If you encountered 'too many fields' error then structure probably not normalized. My suggested structure allows for any number of questions.

    Regardless of the structure, form/subform arrangement needed. Use Master/Child links properties of subform container control to synchronize association of records.
    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
    cptNemo is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    10
    I was thinking about write few lines of code associated with the button to move to the next form. Something like:

    1) Open the next form
    2) Check if the table 2 has already a record with the same ID of form 1
    3) If yes, open that record from table 2 in the form;
    4) if not, create a new record in table 2 with the same ID.
    Last edited by June7; 09-13-2012 at 12:27 PM. Reason: Mod Edit: combine posts

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    You can, but gets complicated. Form/Subform functionality is much easier to set up. No code involved.
    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. Linked forms
    By Misha in forum Forms
    Replies: 4
    Last Post: 02-26-2012, 08:52 AM
  2. Replies: 5
    Last Post: 02-02-2012, 06:42 PM
  3. Replies: 2
    Last Post: 03-21-2011, 12:55 PM
  4. Multiple linked forms
    By johnpaul in forum Forms
    Replies: 2
    Last Post: 09-20-2010, 02:10 AM
  5. Calculations in linked forms
    By Dena Grabinar in forum Forms
    Replies: 0
    Last Post: 08-22-2008, 05:34 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