Solved

Conditional formatting in Access: Adding symbol to field

Posted on 2012-04-03
5
304 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now