Solved

Highlight certain fields on continuous form

Posted on 2014-02-25
3
390 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
  • 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 500 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

730 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