By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,773 Members | 2,583 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,773 IT Pros & Developers. It's quick & easy.

Check if memo field is empty

P: n/a
I'm pulling what's left of my hair out. I'm trying to check a memo
field on opening a report. If the field has "value", I'd like to
change the fields back color. If it's "Empty", I'd like to leave it
white. (i.e. if their is data in the memo field, I want it
highlighted in yellow.) I've tried isnull, isempty, ="", all with no
luck. I'd appreciate any suggestions and thanks in advance.

Brian
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
In Access 2002, use conditional formatting for the field. No code is necessary.

Cheers,
Pavel

Brian wrote:

I'm pulling what's left of my hair out. I'm trying to check a memo
field on opening a report. If the field has "value", I'd like to
change the fields back color. If it's "Empty", I'd like to leave it
white. (i.e. if their is data in the memo field, I want it
highlighted in yellow.) I've tried isnull, isempty, ="", all with no
luck. I'd appreciate any suggestions and thanks in advance.

Brian

Nov 12 '05 #2

P: n/a
Brian,
Take care of what's left of your hair ;-)

If IsNull(Me!Memofield) then
Me!MemoField.Backcolor=10092543 'this sets backcolor to yellow
else
Me!MemoField.Backcolor=16777215 'this sets backcolor to white
end if

Use code like this in the Detail-OnFormat event of your report.

--
Hope this helps
Arno R
"Brian" <br************@ci.verona.wi.us> schreef in bericht
news:21**************************@posting.google.c om...
I'm pulling what's left of my hair out. I'm trying to check a memo
field on opening a report. If the field has "value", I'd like to
change the fields back color. If it's "Empty", I'd like to leave it
white. (i.e. if their is data in the memo field, I want it
highlighted in yellow.) I've tried isnull, isempty, ="", all with no
luck. I'd appreciate any suggestions and thanks in advance.

Brian

Nov 12 '05 #3

P: n/a
Brian,
You can't do this in the Report Open event. The control's have no data yet.
Anyway you were given code to do this using the report's Detail Format event
(assuming the memo field was in the detail section).

If you have Access 2000 or 2002, you can use the control's conditional
formatting.
Select the [memo field]. Click on Format + Conditional Formatting.
Set the Condition 1 drop-down to
Expression Is
in the Text box along side the drop-down, write:
[MemoField] Is Not Null
Select the colors for when the condition is met and when it is not met.

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.
"Brian" <br************@ci.verona.wi.us> wrote in message
news:21**************************@posting.google.c om...
I'm pulling what's left of my hair out. I'm trying to check a memo
field on opening a report. If the field has "value", I'd like to
change the fields back color. If it's "Empty", I'd like to leave it
white. (i.e. if their is data in the memo field, I want it
highlighted in yellow.) I've tried isnull, isempty, ="", all with no
luck. I'd appreciate any suggestions and thanks in advance.

Brian

Nov 12 '05 #4

P: n/a
br************@ci.verona.wi.us (Brian) wrote in message news:<21**************************@posting.google. com>...
I'm pulling what's left of my hair out. I'm trying to check a memo
field on opening a report. If the field has "value", I'd like to
change the fields back color. If it's "Empty", I'd like to leave it
white. (i.e. if their is data in the memo field, I want it
highlighted in yellow.) I've tried isnull, isempty, ="", all with no
luck. I'd appreciate any suggestions and thanks in advance.

Brian


Problem solved!!!!! Thanks all!!!
Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.