M
Matthew DeAngelis
I am having an odd problem with this code:
If Not IsNull(Me.PostMoney) Then
If Me.PostMoneyCompValue Like "Between" Then
stSearchCriteria = stSearchCriteria & Trim("[PostMoney] " &
Me.PostMoneyCompValue & " " & Me.PostMoney & " And " & Me.PostMoney2 &
" " & Me.PostMoneyAndOr & " ")
Else
stSearchCriteria = stSearchCriteria & Trim("[PostMoney] " &
Me.PostMoneyCompValue & " " & Me.PostMoney & " " & Me.PostMoneyAndOr &
" ")
End If
End If
This is the last If statement in a series of If statements structured
in the exact same way, but with different field names. My problem is
that the compiler chokes on Me.PostMoney2, saying 'method or data
member not found', despite the presence of the field. In fact, if I
type Me. to bring up the list of fields, I can double-click PostMoney2
to add it, but the compiler still refuses to recognize it. Previously,
before I added PostMoney2, I was getting the same error in that line
for PostMoney, even though the compiler accepted that field as part of
the If Condition.
Is there any reason why the compiler should acknowledge a field in some
instances and not in others?
Thanks,
Matt
If Not IsNull(Me.PostMoney) Then
If Me.PostMoneyCompValue Like "Between" Then
stSearchCriteria = stSearchCriteria & Trim("[PostMoney] " &
Me.PostMoneyCompValue & " " & Me.PostMoney & " And " & Me.PostMoney2 &
" " & Me.PostMoneyAndOr & " ")
Else
stSearchCriteria = stSearchCriteria & Trim("[PostMoney] " &
Me.PostMoneyCompValue & " " & Me.PostMoney & " " & Me.PostMoneyAndOr &
" ")
End If
End If
This is the last If statement in a series of If statements structured
in the exact same way, but with different field names. My problem is
that the compiler chokes on Me.PostMoney2, saying 'method or data
member not found', despite the presence of the field. In fact, if I
type Me. to bring up the list of fields, I can double-click PostMoney2
to add it, but the compiler still refuses to recognize it. Previously,
before I added PostMoney2, I was getting the same error in that line
for PostMoney, even though the compiler accepted that field as part of
the If Condition.
Is there any reason why the compiler should acknowledge a field in some
instances and not in others?
Thanks,
Matt