Solved

Conditional formatting in Access: Adding symbol to field

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

920 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

14 Experts available now in Live!

Get 1:1 Help Now