color help pls

roh_8_it_3

Registered User.
Local time
Today, 12:27
Joined
Feb 15, 2005
Messages
79
hi all

i have a continous form which is bind to a datatable.I want to show a particular coloumn with different background cols depending on its values.

On the page load i m doing this like-

If txtprodtype.Value Like "*atm*" Then
txtprodtype.BackColor = 255
End If

but the problem is that it checks this only for the first record.how can i apply this to all of the records??

Thanks
 
hi all

I dont want to use the conditional formatting ..so is there any solution for this..its setting the format of the first record to all the records.

Thanks a lot
 
Try pasting this code on form_current;

If [txtprodtype] Like "*atm*" Then
txtprodtype.BackColor = vbred

Else
txtprodtype.BackColor = vbwhite
End If


hth,
Michael
 
Thanks for ur reply.I tried that also but its not working.

Actually it only formats the first row after that it renders the form.
 
If this is a continuous form then you'll have a great deal more work than simply using the inbuilt conditional format option
 
Yes its a continous form.Is there any solution for this??

Thanks
 
Conditional formatting gives me only 3 options and also i have to give the exact match.thats why i dont want to use it

Thanks
 
Thanks,

I saw that link and tried to use it but the problem is that it displays red color for null values and the values which are not in list

i specified the control source as-

switch(<col> like '%A%',1,<col> like '%B%',-1,<col> like '%C%',0,<col> like '%D%',NUll)


But the col have values other than the A,B,C ,D and also null values and for them it takes the red colour.

any suggestions pls?

Thanks
 
Thanks Pat..appreciate ur help.I checked that site also.he is changing the backcolour of the entire row on the basis of the current record.But i need to change the col depending on the values of a particular textbox.

The last u sent to me is ok but the only problem is that it changes the backcolour to the red for the null values and also for the values that are not in the criterial .

I tried to use this syntax in the control source ex- col like '%A%' and col is not null

but its not taking this.

Thanks
 
Thanks Pat for ur advice.I searched this forum from google too.
 

Users who are viewing this thread

Back
Top Bottom