Solved

Conditional formatting in Access: Adding symbol to field

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

776 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