![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I want to set the Backcolor property of a text box automatically. The value of the Backcolor is stored in another text box in the same record. Thanks, John |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Phil, I had tried that, with no success. Assume a Tabular subform containing a bound text box called "cbolngPatientID" that needs to have its backcolor set automatically. The backcolor number is held in textbox "lngBackcolor". Both textboxes are in the same record. I created textbox "lngBackcolor" for ease of use and it does a DLookup in another textbox "lngServiceID" to retrieve the backcolor number. John |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
Unfortunately it is a continuous form. I had a look at the code you referred to. As you know, it paints the entire row and not a selected text box. Any suggestions would be greatly appreciated. This is a prime example of something that appears to be simple to implement but it is not. Thanks for your help, John |
#7
| |||
| |||
|
|
Unfortunately it is a continuous form. I had a look at the code you referred to. As you know, it paints the entire row and not a selected text box. Any suggestions would be greatly appreciated. This is a prime example of something that appears to be simple to implement it is not. Thanks for your help, John |
#8
| |||
| |||
|
|
JohnP <john (AT) kosmosbusiness (DOT) com> wrote : Unfortunately it is a continuous form. I had a look at the code you referred to. As you know, it paints the entire row and not a selected text box. Any suggestions would be greatly appreciated. This is a prime example of something that appears to be simple to implement but it is not. Thanks for your help, John What you must do is layer several textboxes. the topmost textbox contains your cbolngPatientID and has a transparent background. For each color (hopefully only a few colors), you add a textbox behind the existing ones, which gets its contents from a field calculated in the query behind the form, the calculation is similar to string(10,chr(IIF(WantedColorRed=true,219,32)) set the font to terminal, font size to fill the box and you make the background is transparent and the foreground color is Red. The next tectbox would be blue, etc. in the Terminal font, Chr(219) is a solid box, 32 is space, so depending on the caLculation is true or false the foreground gets filled with the boxes or spaces. Since the box is behind the box with the text,it looks like the background of the front textbox changes color. |
#9
| |||
| |||
|
|
I want to set the Backcolor property of a text box automatically. The value of the Backcolor is stored in another text box in the same record. |
#10
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |