If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
If Statement for Memo Field
I have a memo field on my form named Job with it's control source set to Job
Description On the main forms current event is the below code. I want the Label368 to be visible if the memo field says None in it, else not visible. Do I need to set the default value of the memo field to =None ? The label368 is set to Not Visible by default. What am I doing wrong? The Label368 is showing all the time. If ([Job Description]) = "None" Then Label368.Visible = True Else: Label368.Visible = False End If |
#2
|
|||
|
|||
On Mon, 20 Sep 2004 15:27:03 GMT, Dave Elliott wrote:
I have a memo field on my form named Job with it's control source set to Job Description On the main forms current event is the below code. I want the Label368 to be visible if the memo field says None in it, else not visible. Do I need to set the default value of the memo field to =None ? The label368 is set to Not Visible by default. What am I doing wrong? The Label368 is showing all the time. If ([Job Description]) = "None" Then Label368.Visible = True Else: Label368.Visible = False End If It's the Form's Control value you need to assess, not the field value. You don't need the colon after Else. If the user can enter data into the Job control, then you should place the same code in the Job AfterUpdate event as well as the Current event. If [Job] = "None" Then Label368.Visible = True Else Label368.Visible = False End If You could simplify this to simply: Label368.Visible = [Job] = "None" What do you wish to happen if the memo field is Null? -- Fred Please only reply to this newsgroup. I do not reply to personal email. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Filtering on custom date field | MED | Contacts | 3 | September 17th, 2004 03:05 PM |
adding a field causes 90% of report to go away | cmpgeek | Setting Up & Running Reports | 6 | June 10th, 2004 08:47 PM |
Using IIF statement in Memo Field | J Cunningham | Running & Setting Up Queries | 5 | May 26th, 2004 09:19 AM |
lookup field | rvmom | New Users | 2 | May 23rd, 2004 03:06 AM |
Make a field lookup dependent on the value in another field of a record? | Susan A | Database Design | 8 | May 22nd, 2004 09:10 PM |