Results 1 to 4 of 4
  1. #1
    Entellex is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Mar 2015
    Posts
    14

    Predefined Subforms?

    I want to have a predefined subform when I start a new record. Predefined as in consisting of multiple lines/record predefined or based on a table I created.



    Where it brings multiple lines similar to below, where all I have to do is manually enter in the Quantity or any other field:

    Type 1 Type 2 Type 3 Quantity
    Food Fruit Apple
    Food Vegetable Tomato







    Or is there a way where I can have multiple input fields on my main form that I fill in with information and when I press a button it inserts those lines into my subform with certain predefined fields.

    Example:

    On my main form I have multiple text-boxs where I can enter a quantity of how many apples (2) I want and/or how many tomatoes (1) I want.

    When I click the button it will add these lines to the subform predefined:

    Type 1 Type 2 Type 3 Quantity
    Food Fruit Apple 2
    Food Vegetable Tomato 1






    Sorry if it is confusing, I am pretty confused myself, lol.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Have you looked into the LinkChildFields Property and LinkMasterFields Property of the subform control? The wizard might help you to get things situated.
    https://msdn.microsoft.com/EN-US/lib.../ff195880.aspx
    AND
    https://msdn.microsoft.com/EN-US/lib.../ff822089.aspx

  3. #3
    Entellex is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Mar 2015
    Posts
    14
    Well I already have my Mainform/Subform linked. I just don't have the knowledge of being able to implement predefined records

  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 Entellex View Post
    ... I just don't have the knowledge of being able to implement predefined records
    I don't think I have that knowledge either. Forms, as well as subforms, use the RecordSource Property to determine what data is retrieved. A subform has an additional method for retrieving data via the Link properties previously mentioned. If you want to display predefined records, you will have to be able to predefine it via the RecordSource. In other words, create a query for the recordsource of a subform that provides you with the desired results.

    So, start fresh by building a new query. Adjust your new query so it retrieves the desired records. Use the new query as the RecordSource of your form/subform.

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

Similar Threads

  1. Predefined table fields
    By Entellex in forum Access
    Replies: 6
    Last Post: 03-04-2015, 11:33 AM
  2. VBA to update to predefined text where is null
    By webisti in forum Programming
    Replies: 1
    Last Post: 12-05-2012, 02:13 PM
  3. Replies: 9
    Last Post: 07-11-2012, 04:13 PM
  4. attachments to predefined directory
    By surfcaster in forum Forms
    Replies: 0
    Last Post: 03-04-2010, 02:22 PM
  5. Replies: 2
    Last Post: 01-22-2010, 03:53 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