Solved

Conditional formatting in Access: Adding symbol to field

Posted on 2012-04-03
5
334 Views
Last Modified: 2012-08-13
Hello!

I have an access form with, for the purpose of this question, has two fields:

"Action" and "Action Type"

"Action" is a text field. It is just the name of any action.

"Action Type" is a number field. It defines an action as being a task or a meeting. 1 for task, 2 for meeting.


When the "Action Type" is 2, I want whatever is in the "Action" field preceded by a *.

Example: Worked on this database till my eyes popped out. (Action Type 1)
                *Meeting about how I cry too much when working on databases (Action Type 2)


How should I do this? And ideas?

Thank you!
0
Comment
Question by:Megin
  • 3
  • 2
5 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 37804133
I would suggest not storing the * with your data.

Instead, create a label next to the Action field that just displays a "*"

then in the Current Event of your form:

Me.lblAsterisk.Visible = (Me.[Action Type] = 2)
0
 

Author Comment

by:Megin
ID: 37814608
I am afraid this isn't working for me. For some reason, either all of the tasks have an asterisk or none of them do.

Any more ideas?
0
 

Accepted Solution

by:
Megin earned 0 total points
ID: 37816640
I solved this by adding a special query field:
                           strAction: Iif([actType]=2,"*" & [ActName],[ActName])


Thank you to those who took the time to try and help! This site is fantastic!
0
 
LVL 61

Expert Comment

by:mbizup
ID: 37816989
Sorry I missed your follow up question.

The reason you were seeing "all or none" with the solution I posted is most likely because you are using continuous forms (all unbound controls "look" the same).  That solution would have worked out okay with a form in single form view.

It's always a good idea to include a note in your original post to make it clear when you are using continuous forms or datasheets.  The solutions are generally straight forward  -- but different depending on the form view.

Glad you've got it resolved, and thanks for posting the solution.
0
 

Author Closing Comment

by:Megin
ID: 37831679
I found the solution on another website and wanted to close out this question. Someone on UtterAccess gave me the answer I needed.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA 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 …

679 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