Results 1 to 2 of 2
  1. #1
    trolleri is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    43

    Create new record, and link it with new records in all other tables

    Watch below for database structure:
    Click image for larger version. 

Name:	structure.jpg 
Views:	6 
Size:	111.0 KB 
ID:	11417

    tblSubjects contains fields for identifying the subjects in a research. The other tables are to contain data tied to the subject (questionnaires etc.). Attached is my draft: 33 - English.zip

    Demonstration (what works):


    1) Open my database
    2) In the list box, double-click one of the two records.
    3) Watch how frmNavigation opens and you are able to browse through the different panes in the Navigation Form. All panes have subforms, which are meant for entering data into all other tables than tblSubject. The subforms are linked with tblSubjects via the SSN-field as shown in the picture above.

    Problem (what does not work):
    1) Open my database
    2) Press the button "New"
    3) Enter a new subject - you only need the fields "SSN" and "SubjectNo." to create a new record.
    4) Press "Close" to go back.
    5) Refresh by start searching - and search the new record you just created.
    6) In the list box, double-click the new record you created.
    7) You cannot save any data into the subforms, because you get the error "You must enter a value in the SSN-field".

    How do I overcome this?

    Ideas:
    When creating a new record with frmSubjects, do I need to duplicate the entered value of SSN into all other tables as a new record?
    Alternatively, can I make the subforms smart enough to automatically create a new record in their respective table, if no SSN-value matches the one I have looked up in the header of frmNavigation?

  2. #2
    trolleri is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    43
    Tab Control solves the above problem automatically, so I have decided to stray away from the Navigation Form, and use the Tab Control for subforms instead.

    Then I will do the resizing of subforms manually.

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

Similar Threads

  1. Replies: 2
    Last Post: 12-29-2012, 03:11 PM
  2. Replies: 2
    Last Post: 12-20-2011, 07:33 AM
  3. Click Event to create Records in two tables
    By mrfixit1170 in forum Forms
    Replies: 11
    Last Post: 10-20-2011, 12:01 PM
  4. Auto Record create across tables
    By b123 in forum Database Design
    Replies: 15
    Last Post: 10-02-2010, 01:36 AM
  5. Replies: 6
    Last Post: 07-16-2010, 10:25 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