Hey all
I am having a severe HEADACHE trying to figure out what is wrong with a function I have written, so any tips/solutions to help me solve my problem will be VERY much APPRECIATED!
Problem:
I have a function that will validate data based on pre defined checks, that I have incorparated into my program, and this works quite fine. However the problem arises if a form (page) contains subforms. If it does, then it will check how many subforms and then validate each row of the subform, by recalling the function that it is called from.
This is the part of the code which contains the problem:
SubFormData.Form.Recordset.MoveFirst
Do Until SubFormData.Form.Recordset.EOF
vSubFormsOK = RunSinglePageEditChecks(PageNo, True, SubNo, Y)
SubFormData.Form.Recordset.MoveNext
Loop
After it has validated the first row, it returns but does not validate the second row of the subform, it instead gives the error message : 'An error has occured whilst validating the page. The particular error is application-defined or object defined error'. At this point all validation then stops.
Any ideas what is wrong with the do loop, or why this problem may be occuring.
Note: SubFormData is a object.
Thanks in advance!
I am having a severe HEADACHE trying to figure out what is wrong with a function I have written, so any tips/solutions to help me solve my problem will be VERY much APPRECIATED!
Problem:
I have a function that will validate data based on pre defined checks, that I have incorparated into my program, and this works quite fine. However the problem arises if a form (page) contains subforms. If it does, then it will check how many subforms and then validate each row of the subform, by recalling the function that it is called from.
This is the part of the code which contains the problem:
SubFormData.Form.Recordset.MoveFirst
Do Until SubFormData.Form.Recordset.EOF
vSubFormsOK = RunSinglePageEditChecks(PageNo, True, SubNo, Y)
SubFormData.Form.Recordset.MoveNext
Loop
After it has validated the first row, it returns but does not validate the second row of the subform, it instead gives the error message : 'An error has occured whilst validating the page. The particular error is application-defined or object defined error'. At this point all validation then stops.
Any ideas what is wrong with the do loop, or why this problem may be occuring.
Note: SubFormData is a object.
Thanks in advance!