J
James
Hello I have a form where by I select a value from a combo
box in 3 combo boxes and it produces a percentage at the
end in a text box....
Now the after update works on all three combo boxes...
Except on the third one when I select not sure...
It tells me it cant produce an automation object
for "Sure"...
What could the problem be??
The code I have on After Update is this:
=CalcReturnCount()
Which has the vb of:
-----------------------------------------------------------
Private Function CalcReturnCount()
Dim sFilter As String
If Not IsNull(cboGender) Then
sFilter = sFilter & "(RespondantID=" & cboGender & ")
and "
End If
If Not IsNull(cboQuestion) Then
sFilter = sFilter & "(QuestionID=" & cboQuestion & ")
and "
End If
If Not IsNull(cboAnswer) Then
sFilter = sFilter & "(Answer=" & cboAnswer & ") and "
End If
' chop off the last " and "
If Len(sFilter) Then sFilter = Left(sFilter, Len(sFilter) -
5)
txtReturnCount = DCount("*", "tblResponses", sFilter)
End Function
-----------------------------------------------------------
How can I get around this?
Many Thanks
James
box in 3 combo boxes and it produces a percentage at the
end in a text box....
Now the after update works on all three combo boxes...
Except on the third one when I select not sure...
It tells me it cant produce an automation object
for "Sure"...
What could the problem be??
The code I have on After Update is this:
=CalcReturnCount()
Which has the vb of:
-----------------------------------------------------------
Private Function CalcReturnCount()
Dim sFilter As String
If Not IsNull(cboGender) Then
sFilter = sFilter & "(RespondantID=" & cboGender & ")
and "
End If
If Not IsNull(cboQuestion) Then
sFilter = sFilter & "(QuestionID=" & cboQuestion & ")
and "
End If
If Not IsNull(cboAnswer) Then
sFilter = sFilter & "(Answer=" & cboAnswer & ") and "
End If
' chop off the last " and "
If Len(sFilter) Then sFilter = Left(sFilter, Len(sFilter) -
5)
txtReturnCount = DCount("*", "tblResponses", sFilter)
End Function
-----------------------------------------------------------
How can I get around this?
Many Thanks
James