Question Locked

HELP!!! Conditional Formatting on an Access Data Page

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have developed an Access Data Page (access2003) and I need to do conditional formating in a page depending on the scores from the fields in X table. I used the script from this MSDN article,

http://msdn2.microsoft.com/en-us/library/aa139969(office.10).aspx#odc_customizecontrols_cf

It works, BUT when there are Null values, I get a "Type mismatch 'Cint'" error message. I know that this is because it cannot see the Null's as integers (or so I think). The X table has tons of Null values and it is supposed to have them. I have tried everything, researched all over the net, and I cannot find an answer.

Here is my code:

I tried using: If IsNull(bandHTML.children("XValue").Innertext) Then
bandHTML.children("XValue").style.backgroundColor = "#ffffff"

and it does not work, I also used .Value, and NOTHING... I have tried 10 types of combinations to get it to recognize the Nulls and I have not had luck. I am relatively new at this, I would really appreciate your help!

New Guy

2 replies

by the.suxuor

I am even more lost...

I cant even get the basic code to work...

I have some questions. on the coding... the part that says:

If (dscei.DataPage.GroupLevel.RecordSource = "X Table") Then

What is "X table" referring to? Is it he name of a field? the name of a query? where the data is coming from?

Also

If (Cint(bandHTML.children("XValue").Innertext)

Is "XValue" referring to the name of the text box? the column name in the table? what the heck is it referring to!? this is such simple code i am going insane from not being able to understand it! someone please respond

This discussion is closed to new replies.