Validation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lewe22
    New Member
    • Sep 2007
    • 94

    Validation

    I am trying to set the validation of a text box and have run into difficulties.

    I have a main form [frmDistLearnByS ubMain] which contains student, assessor and course information, and a linked subform [frmDistLearnCon tactDets] which contains expanded details of all assessments made by the assessor. (Shown as a continuous form)

    The sub form captures amongst others the start and end time of the assessments. I have a field next to it which calculates the duration [txtDuration], and I am then performing a sum of the duration in the form footer [txtDurationTota lCurrentSess].

    The main form passes some course information, specifically a value called guided learning hours [txtGLH ]through to the sub form and this is stored in the sub forms header.

    What i want is for the user to be able to enter assessment details but not exceed the guided learning hours.

    ie, if a course has a GLH of 13 then that value is passed into the sub form where the user is then unable to enter assessments totaling more than 13 hours.

    My initial thoughts were that i could validate the end time field with
    Code:
    [txtGLH] > [txtDurationTotalCurrentSess]
    but it doesn't work. Does anyone have any other ideas how i might achieve this?
Working...