P
PaulF
MS Access 2003/XP Professional/.mdb is in 2000 format.
Get the above error message when opening/previewing report that has code in
the on format event Code (code below). The error will occur with both
calculated fields and "real" fields (but other similar expressions work fine).
I have deleted the report recordsource, saved and closed the report,
reopened and reassigned the recordsource property to the saved query, I have
tried using an SQL statement as the recordsource, I have compacted and
repaired, I have decompiled the database, I have compiled it (compile runs
without error). The field names DO appear in the field list and the field
name(s) will autocomplete when I create the code--but won't recognize when I
run the code.
Tearing out what little hair I had remaining.
Paul
Code Below:
NOTE-This first if works fine
If Detail.BackColor = 12632256 Then
Detail.BackColor = vbWhite
Else
Detail.BackColor = 12632256
End If
NOTE: This is the if that blows up--"...can't find field
'IsNotedAsComplete'..."
If Me.IsNotedAsComplete Then
{do stuff}
Else
{do other stuff}
End If
NOTE: This if works fine, and FLGD_Flagged is a field in the dB/query, not a
report control
If Me.FLGD_Flagged = True Then
Me.txtFlagReason.Visible = True
Else
Me.txtFlagReason.Visible = False
End If
Get the above error message when opening/previewing report that has code in
the on format event Code (code below). The error will occur with both
calculated fields and "real" fields (but other similar expressions work fine).
I have deleted the report recordsource, saved and closed the report,
reopened and reassigned the recordsource property to the saved query, I have
tried using an SQL statement as the recordsource, I have compacted and
repaired, I have decompiled the database, I have compiled it (compile runs
without error). The field names DO appear in the field list and the field
name(s) will autocomplete when I create the code--but won't recognize when I
run the code.
Tearing out what little hair I had remaining.
Paul
Code Below:
NOTE-This first if works fine
If Detail.BackColor = 12632256 Then
Detail.BackColor = vbWhite
Else
Detail.BackColor = 12632256
End If
NOTE: This is the if that blows up--"...can't find field
'IsNotedAsComplete'..."
If Me.IsNotedAsComplete Then
{do stuff}
Else
{do other stuff}
End If
NOTE: This if works fine, and FLGD_Flagged is a field in the dB/query, not a
report control
If Me.FLGD_Flagged = True Then
Me.txtFlagReason.Visible = True
Else
Me.txtFlagReason.Visible = False
End If