Results 1 to 5 of 5
  1. #1
    rjgriffin46 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2014
    Location
    New Jersey
    Posts
    128

    Limiting and Filling Fields based on Another Field

    The database I am building is for Student & Alumni administration at a non-profit culinary school. In the various forms for entering student information and for defining tests and recording test scores, I would like to not have to re-select things like Class Number or Test number.



    I was able to use the Test Number field as Link Master, Child in a Test Results sub-form where Test Parameters is the Master form. But I am not able to link with the Class Number, getting the error message: "The setting you entered isn't valid for this property" even though it is one of the Suggested Link Fields. The form record source is a query linking the Class Table, Test Parameters, Test Results and Students.

    I noticed that I can eliminate both Class Number and Test Number from the sub-form. In the underlying query, both these fields are updated. However, the underlying Test Results table does have the Test Number but not the Class Number. While there is still a "queryable" link from the student to the Class Number, I would very much want the Class Number to be stored in the Test Results table.

    Is there a way to accomplish this through the sub-form Link Master/Child property or any other/better way to inherit both the Class Number and Test Number in each Test Results record entered?

    Thanks

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by rjgriffin46 View Post
    ...Is there a way to accomplish this through the sub-form Link Master/Child property or any other/better way to inherit both the Class Number and Test Number in each Test Results record entered?...
    If I understand the problem correctly, no. You will only be able to link one field as Main/Child. When I need to include additional criteria to subforms, I use VBA to adjust the subform's RecordSource. Another approach is to base the subform on a query. In turn, the query can have Dependent Dynamic Parameterizes associated with the Main form. The difference being, there is almost no limit to the criteria you can apply to a Record Source of a subform and there is a limit to Main/Child links.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Yes, you can have multiple Main/Child fields on the form
    for Property:
    LINK CHILD FIELDS: field1;field2
    LINK MASTER FIELDS: field1;field2

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by ranman256 View Post
    Yes, you can have multiple Main/Child fields on the form
    for Property:
    LINK CHILD FIELDS: field1;field2
    LINK MASTER FIELDS: field1;field2
    Thanks for correcting me. I think I knew that too. I just never use it as an option. Perhaps I should consider it in the future.

  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,816
    Yes, compound keys - something I prefer to avoid.
    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. [need help] fields not filling up properly
    By shuto13 in forum Forms
    Replies: 5
    Last Post: 07-31-2012, 06:15 AM
  2. Replies: 1
    Last Post: 08-07-2011, 03:22 PM
  3. Filling in Fields
    By BigCat in forum Access
    Replies: 2
    Last Post: 05-19-2011, 02:02 PM
  4. Replies: 4
    Last Post: 07-28-2010, 10:27 AM
  5. Limiting fields to certain lengths......
    By softspoken in forum Access
    Replies: 5
    Last Post: 04-20-2010, 12:32 PM

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