Conditional Boolean

Cameroncha

Registered User.
Local time
Today, 22:32
Joined
Jul 1, 2002
Messages
58
hello, i am not too hot with coding but this should not be too hard so if someone could help me i would greatly appreciate it.

Here is what i am trying to do:
I have an items description divided into several parts all of which i combine later for use:

Copy [memo]
Atheletes [memo]
Music [memo]
BonusMaterial [memo]
UserReview [memo]

I want to have a Boolean field activated based on a number of the above fields being filled in or not. In other words, if more than 3 of the fields above are filled out, i want DescriptionExists
equal to Yes, if less than three of the fields are filled out i would like DescriptionExists to be No

Help !!!!!!!!!


:confused:
 
Try this :


In the After_Update event on the form you iwll need to call something similar to this : GetDescriptionExists()


Private Sub GetDescriptionExists()
Dim nCount As Integer

nCount = NotNullCounter(RecordSetClone!Copy)
nCount = nCount + NotNullCounter(RecordSetClone!Atheletes)
MsgBox nCount ' this is the count of non null fields...
' you can now use this to update the descipriotn field with the appropriate text!
End Sub

Private Function NotNullCounter(fld As Field) As Integer
If IsNull(fld) Then
NotNullCounter = 0
Else
NotNullCounter = 1
End If
End Function
 

Users who are viewing this thread

Back
Top Bottom