Continuous Forms Question

T

tclarke

Using access 2003, I have a form which displays Student Data, for a
single student, from StudentTbl and Exam Data, for the same student,
from ExamTbl.

Student Data is displayed in Single Form view and Exam Data is
displayed as a sub form in Continuous Forms view.

Is it possible to create a bound text box, (txtL1Pass), in the Student
Data section of the form, which will display either PASS or FAIL
depending on whether the Pass check boxes on the Exam sub form
(Continuous Forms) are true or false for modules 1, 2 and 3.

Something like this:

If Forms!ExamsSubForm!chkbxMod1Pass=True AND
Forms!ExamsSubForm!chkbxMod2Pass=True AND
Forms!ExamsSubForm!chkbxMod3Pass=True
Then
Me.txtL1Pass="PASS"
Else
Me.txtL1Pass="FAIL"
End If

Also, if it's possible, where would the event procedure be placed?
 
A

Albert D. Kallal

Sure, just make a function in the sub-form. The function can look like:

Public Funciton PassText As Variant

on error goto ex1:

if me!checkbxMod1Pass and me!checkbxMod2Pass and me!checkMod3Pass then
PassText = "PASS"
else
PassText = "FAIL"
End If

ex1:

end Function

Now, just place a text box on the sub-form called txtL1Pass.

Set the data souce of the text box to

=PassText()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top