peispud
asked on
Access 2010 Conditional fields
Hi.
I am using Access 2010
I would like to use conditional formatting to change the colour of a row if it is locked.
Since I am using this rule over several columns, I would prefer if the syntax in the conditional statement were to refer to it's own "self" column instead of by column's name.
For example.
[Field1].Locked=True ... this works fine but I would prefer to have the syntax read something like
col().locked = true so I can use the same code over multiple columns.
Hope you can help.
I am using Access 2010
I would like to use conditional formatting to change the colour of a row if it is locked.
Since I am using this rule over several columns, I would prefer if the syntax in the conditional statement were to refer to it's own "self" column instead of by column's name.
For example.
[Field1].Locked=True ... this works fine but I would prefer to have the syntax read something like
col().locked = true so I can use the same code over multiple columns.
Hope you can help.
ASKER
I apologize.
This is what I asked but it was not a good question....
I would like to use conditional formatting to change the colour of a row if it is locked.
I should have asked
I would like to use conditional formatting to change the colour of a column if it is locked.
This is what I asked but it was not a good question....
I would like to use conditional formatting to change the colour of a row if it is locked.
I should have asked
I would like to use conditional formatting to change the colour of a column if it is locked.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can use VBA to handle this, see this link
http://msdn.microsoft.com/en-us/library/aa139965%28v=office.10%29.aspx
http://msdn.microsoft.com/en-us/library/aa139965%28v=office.10%29.aspx
ASKER
Thank you.
But, could you use a function?
Something Like:
function funLock( col_name as string, bolVal as boolean) as string
dim retVal as string
dim strVal as string
if bolVal = 1 then strVal="True"
else
strVal="False"
endif
retVal=col_name & ".locked = " & strVal
return retVal
Or worst case you could create a function that locks and unlocks a series of columns.