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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Formatting Continuous Form? 1

Status
Not open for further replies.

misscrf

Technical User
Jun 7, 2004
1,344
US
I have read the posts on this and I swear I am doing exactly what I am supposed to do, but it doesn't seem to work.

I have a continuous form with a control called txtMediaType. It is bound to the field MediaType. I have the conditional formatting set in the gui to Expression is IsNull([MediaType]) . When I go to form view, if I am in that control on the record where that is true, the back color changes to yellow, like it should. But if I am in any other control on that row or another, the row column that should be yellow doesn't stay yellow.

Can anyone please tell me what I am missing?

I also have an unbound text box, that I evaluate a value that is in the control source of the form, but not in any control on the form, and that one works fine.

Wondering if I need to make a calculated value in the control source and call that for this as well. Any thoughts, I appreciate the help.

Thanks!

misscrf

It is never too late to become what you could have been ~ George Eliot
 
How about?

Code:
IsNull([MediaType].[red]value[/red])
 
Thank you both for responding. I started to write this whole response and then had a "duh" moment at "why does transparent matter".

I will go change that....

misscrf

It is never too late to become what you could have been ~ George Eliot
 
I have a bonus question for you, now that I fixed that part of the problem. I have one field that I want to set conditional formatting on. It needs to be 6 digits. No more no less. So it could be 000001 or it could be 999999.

I was looking at isnumeric(field) and len(6) but not sure if that would work. Any thoughts?

misscrf

It is never too late to become what you could have been ~ George Eliot
 
If all you are missing is leading 0's...

Code:
Right("000000" & [fieldName],6)

Otherwise, you might consider IIF and Isnumeric to handle the non-numbers in the falsepart.
 
In Conditional Formatting:

Expression Is

Len([ControlName])<> 6


and set the desired Formatting.

The Missinglinq

Richmond, Virginia

The Devil's in the Details!
 
I'm not sure you need conditional formatting ...

Something like...
Code:
Format(Field, "000000")

Or the same format mask should work on a control property.
 
ok, so to answer your questions, the table is a sql table that has a field data type of nvarchar(6). In access it treats it as text. This is how there "can" be a 0 padding. I need 6 numeric digits, but the left most digit can be anything from a 0-9. Every one of the 6 digits can be a 0-9.

I found that this works great: [txtboundfieldcontrol] Not Like "######"

This whole form is a preview of data imported from a spreadsheet, into this table for us to "validate" and let people fix the fields that have to have info and legitimate info. Once this preview screen is cleaned up, the data will be appended into normalized tables.

Now I have this part done. Next will be to append the validated rows to normalized tables (for respective columns) and update this "staging" table with the identifiers from each normalized table, so if I need to troubleshoot any imported data, I can.

The main thread for the big picture is here thread702-1714917 .

This conditional formatting issue seemed to be its own problem, so I made it a new thread.



Thanks all for your help!!

misscrf

It is never too late to become what you could have been ~ George Eliot
 
Now that we have details... I'm back to the fist suggestion I made, use the right function with a concatenation of 0's.
 
Thanks, Lameid. I'm not sure there is a point to changing it since the conditional format of the "######" works. It is great to see how many different solutions there can be to one issue.

misscrf

It is never too late to become what you could have been ~ George Eliot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top