Validation of sub form records

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • munkee
    Contributor
    • Feb 2010
    • 374

    #1

    Validation of sub form records

    Hi all,

    I have a subform on my main form which displays as a single form.

    Using custom navigation buttons I move through the records in the subform related to it's parent.

    I can do basic form validation fine and validate that boxes within the subform are filled in correctly. However how do I set up the following validation:

    Within subfrmAction each record has a value entered for "txtActionCompl etedDate".

    So basically if a record exists within the sub form I want to check txtActionComple tedDate has a date. The catch for me, is there are x amount of records how do I check all records have txtCostFig filled in one go.

    Edit:

    I found a similar post and I think missinglinq asked why the validation was not done prior to record save.

    My scenario is that an action will be assigned to a person. Then the manager will come back close to the proposed end date of the action and assign the actual completed date.

    Validation will then be used to enable a button to be clicked if all actions have a completed date to recommend the overall project to be closed. If a completed date is not entered in a record then the button will be disabled until it is added.
  • munkee
    Contributor
    • Feb 2010
    • 374

    #2
    I have given dao a bit of a go and used the find first to find the records associated in the subform against th emain form ID number and then test the fields to find the first null field. If no nulls are found then the button will fire the event if not the button will error and tell the user why.

    Comment

    Working...