473,320 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Check if memo field is empty

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
4 12052
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Shyguy | last post by:
I want to create two buttons on a form. One would allow the user to Copy the contents of the current records memo field, the other would allow them to print. I set up a report based on the memo...
3
by: GorDon | last post by:
Hi, I have a report based on a query. The query grabs a memo field from my main table, yet when I display the memo field in the report it truncates the memo field (the field needs to hold more...
4
by: intl04 | last post by:
I have a memo field that is included in some Access reports I created. Is there some way for the memo field to display nicely formatted text, with line breaks between paragraphs? Or is it necessary...
2
by: Chris Windsor | last post by:
I hope the following describe what I'm trying to do: I have created a tool to be used by product analysts when studying different cell phone designs. Part of the tool is a set of 11 forms on a...
1
by: Jim M | last post by:
To prevent data corruption I have replaced a memo field on my form with an unbound control on my form that I populate with a function that fills it from a memo field from my table. When the form is...
3
by: toufik | last post by:
Hi, In my table(ms-access) I've a memo field whih is not required, and allow zero length to true. I've in a vb.net form, a textBox bound to this field, - I can leave it as NULL and save. - I can...
9
by: RMC | last post by:
Hello, I'm looking for a way to parse/format a memo field within a report. The Access 2000 database (application) has an equipment table that holds a memo field. Within the report, the memo...
2
by: Roger | last post by:
I've got two tables in sql2005 which have an 'ntext' field when I linked the first table in access97 last week using an odbc data source the access-field type was 'memo' when I link the 2nd...
10
by: ARC | last post by:
This is mainly a speed question. In this example: I have a QuotesHdr table that has a few memo fields. If these memo fields are used extensively by some users, and if their are a large number of...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.