Results 1 to 3 of 3
  1. #1
    Kaloyanides is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2015
    Location
    Arlington, MA
    Posts
    51

    Force Data in Subform

    Getting back into Access after a few years away and I'm rusty...



    I can't recall the best way to force data in a subform. For some reason that's much more complicated than forcing data in a main form. I can't use the table properties because of existing data but going forward I want to make sure certain data is captured.

    Thanks!!!

    Main Form - frmCompanies
    Subform - frmPurchasingSub

    Subform Fields:
    cboItemNum [ITEMNUM]
    ITEMCOST [ITEMCOST]

  2. #2
    jwhite is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Dec 2012
    Location
    North Carolina
    Posts
    349
    Please clarify what you mean by "force data in a subform".

  3. #3
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    For some reason that's much more complicated than forcing data in a main form
    Is that because you've always relied on table field properties to enforce data to be entered into each mandatory "main" form field? There's more than one possible approach and which is best/easiest can depend on the nature of the form and your level of db knowledge.

    Table relationships is one way. If referential integrity option is used, there has to be a value for at least the linked field in both tables. However, certain user behavior might cause a partial record to be lost as the user manipulates the form.
    Another is to validate the required controls upon main form save button click. This can't work if the form is not of the single record type as simply navigating from one record to another in a form with more than one record will attempt to save that record. In other words, a save button is pretty much pointless. You'd have to provide more info about the forms and the process involved if not using relationship method.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 5
    Last Post: 04-15-2015, 04:20 PM
  2. Replies: 1
    Last Post: 11-18-2012, 06:24 PM
  3. Replies: 5
    Last Post: 08-15-2012, 06:01 PM
  4. Replies: 7
    Last Post: 07-15-2011, 01:58 PM
  5. Replies: 4
    Last Post: 04-07-2011, 03:39 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