Solved

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

Posted on 2012-12-20
7
393 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 - Access MVP) earned 500 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
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…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

777 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