Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Here we go again..continous forms and formatting question 1

Status
Not open for further replies.

ballbearing

Technical User
Jan 7, 2004
43
0
0
US
Here's something I did but it needs some tweaking.
Suggestions accepted gladly.

1st the problem:
On a continuous form, when opened, I needed a way to show all accounts that were past due in red. Past due meaning >30 days and a balance greater than $0. I did not want to have to select a record in order for a control(textbox) to show red.

Solution:
What I did was make that textbox transparent and placed another textbox behind it with the controlsource as:
=IIf([Balance]=0,0,Date()-[LastPymtDate]). Then I set conditional formatting for the backcolor and text to be red if >30.
Now, if the Balance is $0 then nothing happens, and if the Date difference is >30 the textbox shows up red.
Clear as mud, right?

Works good but now here's problem:
If that "front" textbox is selected, the formatted (red) textbox behind it gets the focus, and all I see is a red box. Even when I set both textboxes "data" to be disabled and locked, it still gets focus.

Question:
I don't believe I can conditionally format a textbox based upon the values of the 2 other textboxes, can I?
I'm open to ideas.

Gawd I love this Access stuff..too bad I don't know what I'm doing.
 
Hi ballbearing,

Yes, you can.

In Conditional Formatting ...

Under Condition 1, Select Expression Is

.. and then in the single box that opens up beside it, enter your expression, say ..

[blue][Balance]>0 and Date()-[LastPymtDate]>30[/blue]

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
sorry

should be
"0[Red];0[Black];0[Black]"

can't seem to get it to work with your overdue stuff
just < or > 0


 
im trying to write 0 [ b l a c k ] ; 0 [ r e d ] ; 0 [ b l a c k ]
 
Jim,

I have had exactly the same problem - it was pointed out to me that unticking the Process TGML box below where you enter your reply should allow you to enter it correctly.

However, in this case, it takes no account of the date and so isn't sufficient on its own - also ballbearing wants positive values in red.

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
Thanks for the tips folks!

I also came up with a different kind of solution also.
(Not what I had initially intended but not too bad!)

If ya wanna see it..go here and do a right-click, SaveAs thingy [wink]


Gawd I love this Access stuff..too bad I don't know what I'm doing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top