colour of text (1 Viewer)

murray83

Games Collector
Local time
Today, 11:01
Joined
Mar 31, 2017
Messages
728
probably a simple question

have form which inserts data into table, which is then displayed in textbox

the request/question is, can when inputting data into from which is then inserted into table can we set some text with different colour or will it change colour of whole record ?
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 07:01
Joined
Apr 27, 2015
Messages
6,286
In form view, this is quite simple with conditional formatting. I dont think it's possible in table view, but I could be wrong.

It can also be done with VBA using the forms' Before or After update events.
 

murray83

Games Collector
Local time
Today, 11:01
Joined
Mar 31, 2017
Messages
728
In form view, this is quite simple with conditional formatting. I don't think it's possible in table view, but I could be wrong.

It can also be done with VBA using the forms' Before or After update events.

thanks, but i believe conditional formatting is for single items

in my text box its going to be a long line ( well potentiality )

find attached the database and the form which is in question is for Systems

In the textbox labeled Information

please see attached
 

Attachments

  • Handover example.mdb
    1.5 MB · Views: 44

NauticalGent

Ignore List Poster Boy
Local time
Today, 07:01
Joined
Apr 27, 2015
Messages
6,286
I found the form(s) in question. Now I need some details: Under what conditions do you want to change the color, which textbox(es) do you want to change and what color do you want to change them to?
 

murray83

Games Collector
Local time
Today, 11:01
Joined
Mar 31, 2017
Messages
728
i would like the user to be able to either highlight or depending on which textbox it's in then the colour is pre set.

Sort of like 1st text box red, 2nd orange and 3rd green
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 07:01
Joined
Apr 27, 2015
Messages
6,286
Sorry Murray83, but I can be thick. Can you explain it a little differently, I’m afraid I do not understand what it is you’re trying to do.
 

moke123

AWF VIP
Local time
Today, 07:01
Joined
Jan 11, 2013
Messages
3,852
you do not have a form "Systems". You have a form Sys_Main, Sys_Edit and Sys_Info. Sys_Edit and Sys_Info have a textbox labeled "Information" is that what your referring to?
 

murray83

Games Collector
Local time
Today, 11:01
Joined
Mar 31, 2017
Messages
728
in the first text box on the form i would like that to be displayed in red

the second orange and then the 3rd ( the bigger box ) in green

and then when you go back to the form SYS_Main it still shows in the same colours
 

moke123

AWF VIP
Local time
Today, 07:01
Joined
Jan 11, 2013
Messages
3,852
Are you saying that when you edit or add a record to the AM shift, when you go back to the main form you want the am shift box highlighted, indicating a change?
 

murray83

Games Collector
Local time
Today, 11:01
Joined
Mar 31, 2017
Messages
728
Are you saying that when you edit or add a record to the AM shift, when you go back to the main form you want the am shift box highlighted, indicating a change?

no i would like if possible the text to have the same colour as it was when was inputted
 

moke123

AWF VIP
Local time
Today, 07:01
Joined
Jan 11, 2013
Messages
3,852
you mean the color of the actual text and not the textbox?
 

moke123

AWF VIP
Local time
Today, 07:01
Joined
Jan 11, 2013
Messages
3,852
It could probably be done but I doubt it with the way you have you DB set up. I think You would need to use rich text with html markup.

that said, I think I mentioned this to you once prior, but it needs repeating.
Your tables are not normalized. You have 12 tables with the exact same fields in each table and you are storing your shift data in Tables rather than storing the shift data in a field. This is going to make your development harder and harder as you go along. You are using Dlookups where you should probably be using subforms. You are hiding forms rather than closing them. This may well impact on performance down the road. When I clicked through your forms I noted 9 hidden open forms which did not need to be.
Until you address the normalization issues I think your going to find it harder to get the functionality you want.
 

Attachments

  • murray.PNG
    murray.PNG
    25.9 KB · Views: 28

moke123

AWF VIP
Local time
Today, 07:01
Joined
Jan 11, 2013
Messages
3,852
Heres an example of how you could display colors using a textbox formatted as rich text.
 

Attachments

  • colors.mdb
    316 KB · Views: 42
Last edited:

isladogs

MVP / VIP
Local time
Today, 11:01
Joined
Jan 14, 2017
Messages
18,186
Hi moke

By chance, I typed red, blue, green into the boxes and for a second thought there was some VERY clever code going on :D

 

Attachments

  • RBG.PNG
    RBG.PNG
    6.8 KB · Views: 113
Last edited:

murray83

Games Collector
Local time
Today, 11:01
Joined
Mar 31, 2017
Messages
728
Heres an example of how you could display colors using a textbox formatted as rich text.

ooooo :)

i like this thanks ill will have a look and see if i can implement this
 

Users who are viewing this thread

Top Bottom