Results 1 to 2 of 2
  1. #1
    Pete-RM is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2015
    Posts
    8

    Post Controlling a subform based on a query with a main form

    I am trying to create a database that displays the cost of all of my meals and allows me to apply certain meals to certain Days.

    At the moment I have created a form (called frmMainMeal) based on a query that allows me to create meals by selecting different products. This works fine.

    Now that I have created some meals I would like to use a form to apply the meals to certain days. (keep in mind that I would like to be able to use the same meal on more than one day).



    I have created a form (called frmMainDay) with a subform based on a new query that I created (the query totals the $ amounts of each meal), however I cannot enter data into the subform.

    I am new to access and don't know how to fix this issue.

    I have attached the access file for your reference.

    meal template - Copy.zip

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    If you have a main form w a keyID (autonum) for the record,
    then the sub form will need:
    keyID (long integer) duplicates OK
    SubID (autonum)

    set relationships on these 2 tables to allow mulitple record entry
    also in the form/subform design, set the subform LINK MASTER FIELDS, and LINK CHILD FIELDS to keyID

    JUST the sub table... your demo has too many tables involved.

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

Similar Threads

  1. Replies: 4
    Last Post: 06-15-2015, 07:11 AM
  2. Field in the main form based on a subform
    By azhar2006 in forum Forms
    Replies: 4
    Last Post: 03-08-2014, 11:24 PM
  3. Replies: 4
    Last Post: 07-11-2012, 10:31 AM
  4. Controlling Subform from Main Form
    By SteveF in forum Forms
    Replies: 5
    Last Post: 07-01-2011, 05:32 PM
  5. Subform Combobox based on Main form combo box
    By accessmom in forum Forms
    Replies: 5
    Last Post: 02-21-2011, 07:02 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