Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Conditonal format on sub-form based on who is logged onto the form

Posted on 2012-12-20
7
Medium Priority
?
464 Views
Last Modified: 2012-12-21
I have an ACCESS 2003 forms/subform. However, depending on who is logged in, I need the Created_By field in the subform to be red/yellow.  That is, if the person using the form is Sarah and a field in the subform is also Sarah, I need the field on the subform to be red/yellow.  I am in the COnditonal formatting dialog box and assume it would be an experssions, but not sure how to write it.

Sandra
0
Comment
Question by:ssmith94015
  • 3
  • 2
  • 2
7 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 38711499
Something like this - assuming by 'logged in' you mean the Windows User Name ?

cf
mx
Capture1.gif
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38711833
<No points wanted, just a note>
As your users grow, note that CF has a max of 3 conditions by default.

There are ways around this, of course.
I am sure MX can guide you through...

;-)

Jeff
0
 
LVL 75
ID: 38711941
"As your users grow, note that CF has a max of 3 conditions by default."
Good news is that A2010 has lifted that limit ...

mx
0
Technology Partners: 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!

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38712023
Ah, ...never noticed that...

;-)

Jeff
0
 

Author Comment

by:ssmith94015
ID: 38713452
Yes, i am so hoping they go to 2010!  

Now, DatabaseMX, I am going to try your suggestion and yes, I mean Windows Login.  This is a form/subform so I hope it works.  Something like Me.Parent.txtUserID.

Sandra
0
 
LVL 75
ID: 38713731
Also ... the CF dialog (designer) is MUCH nicer in A2010 -

OK ,.. it should work. After which, we will replace Environ() with something better.

mx
0
 

Author Closing Comment

by:ssmith94015
ID: 38714087
Yes that did it.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

916 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