[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Highlight certain fields on continuous form

Posted on 2014-02-25
3
Medium Priority
?
413 Views
Last Modified: 2014-02-25
Good morning experts,

I have a continuous form.  This includes a Yes/No field called "Waived"
I want to include a description on the continuous form, rather than the tick itself.

I have added a text box called WaivedText, containing the text "Waived" and set its Visible property to No.

I then included the following code for the Section OnPaint event:

Private Sub Detail_Paint()
If Me.Waived = True Then
WaivedText.Visible = True
End If
End Sub

But this will not work because I get the error:
"You can't change the value of this property in the OnPaint event."

I couldn't quite figure out where it should be.

Appreciate some help on this.

Regards

Richard
0
Comment
Question by:rltomalin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 39885153
Use conditional formatting.

Right-click the control in design view and select Conditional Formatting...

Select "Expression Is" from the drop-down list, and place this in the box provided:

[Waived] = True 

Open in new window



Then set your formatting options to disguise the text.  ("Visible" is not an option, so just disguise it with text color, etc)
0
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 39885162
Alternatively, you can simply clear the text from your textbox based on the value of Waived.

Just set the control source of your textbox to (include the = sign):

= IIF(Waived = True, "Waived", "")

Open in new window



That will display Waived when Waived is true, and will be blank when Waived is false.
0
 

Author Closing Comment

by:rltomalin
ID: 39885186
Hi mbizup

That's great, thanks.  I like the second suggestion best, so that's what I will do.  Works fine.

Regards

Richard
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question