Font change after click

aattas

Registered User.
Local time
Today, 17:16
Joined
Dec 24, 2014
Messages
75
Experts,
need help

I have a report that has long list of items.one of the field is a link to the main form.
the request from my user if the color of the font could change after i click the selected item, This is similar to Google when you have chosen something the font color change as indication it has been clicked and seen,
Do access can do this?
 
Hi. Is it a hyperlink field? If not, try using a hyperlink field.
 
You mean even when you click elsewhere? It would require you to save the fact that the record has been seen somehow. Easiest would be a field in the same table, but that wouldn't work in a multiuser environment (unless one person "seeing" it should affect everyone).
 
You can just add code like this

Code:
Private Sub ControlName_Click()
Me.ControlName.ForeColor = vbMagenta
End Sub

replacing ControlName with the actual name of your control.

Note that this will only work if the report is opened in report view...not print preview
 
Gentlemen,

Thanks for the suggestions, but i tried a field but it would not change the color.

I saw some using VBA to change color, but i dont understand how to do it.
 
Gentlemen,

Thanks for the suggestions, but i tried a field but it would not change the color.

I saw some using VBA to change color, but i dont understand how to do it.
Hi. Did you try using a Hyperlink field? I tried it and it changed color after I clicked it. See below:


attachment.php


The above was before clicking the link field, and then after clicking the field, it looks like this:
attachment.php
 

Attachments

  • BeforeClick.PNG
    BeforeClick.PNG
    5.5 KB · Views: 307
  • AfterClick.PNG
    AfterClick.PNG
    5.4 KB · Views: 319
Last edited:
Are you using a report procedure to try to open an form in the same database? I just want to be very clear on what type of objects you are using. Normally you would not have a report open a form.
 
OK here's a very basic example to explain what I meant
The app opens with the 'main form' Form1. This has a button to open Form2 which has a button to open the report.
Click the text on the report. It changes colour and reopens Form1

Hopefully this is what you wanted...
 

Attachments

zeroaccess said:
I think that works in tables but not on forms. At least on mine it doesn't.
I don't know, I tried it on a form, and this is what I got.

link.png
 
I don't know, I tried it on a form, and this is what I got.

View attachment 80924
You're too quick on the draw, Access World Ninja. You replied to my deleted post after I saw the date of the last post.

No matter - Just a guess, but I think it may depend on whether that field is locked. All of my hyperlink fields are locked with the hyperlink hand cursor and they stay blue. They are not http:// links, though, which may or may not also matter.
 
You're too quick on the draw, Access World Ninja. You replied to my deleted post after I saw the date of the last post.

No matter - Just a guess, but I think it may depend on whether that field is locked. All of my hyperlink fields are locked with the hyperlink hand cursor and they stay blue. They are not http:// links, though, which may or may not also matter.
Ah, okay. Sorry.
 

Users who are viewing this thread

Back
Top Bottom