This is probably very easy but I'm not experienced with writing code.
Here's what I'm trying to do:
I want to print a report that has text "Unapproved Document" at the top
if two conditions are met:
1. PriceIncrease field is checked (true)
2. Approval field is Null
If the conditions are not met, then the words "Unapproved Document"
will not appear in the report.
The report pulls these fields from a query called OAQuery. I created
an unbound text field in the report named "ApproveWarning" that will
act as a container to put the words "Unapproved Document".
Here's my code, which is getting a runtime error:
Private Sub Report_Open(Cancel As Integer)
If OAQuery.PriceIncrease = True Then
If OAQuery.Approvel = Null Then
Me!ApproveWarning = "UNAPPROVED DOCUMENT"
Else
Me!ApproveWarning = Null
End If
End If
End Sub
What am I doing wrong??