Calculated field - image

mlahajnar

Registered User.
Local time
Today, 16:05
Joined
Jul 23, 2015
Messages
28
Hello

I'm currently building a database and one of the things that I must make is a "warning", more like a symbol on a continuous form, that is there, if the task is wanted by a costumer.

I have a Yes/No field in database, which decides that. Now I need to figure out how to make it appear on form. I thought about making a calculated field, that would display some warning icon.

Now my question is, is it possible to add an icon to a calculated field and if possible, how?
 
Not required. You don't want to clutter up the record with embedded icons - they are space hogs. Not to mention that since this appears in the "Tables" section I would say NEVER (if at all humanly possible to avoid) NEVER try to put a computed field in a table. That is to be taken as the scene from "H.M.S. Pinafore" where the crew and captain sing the song "I Am the Captain of the Pinafore." {What never? No never... What never? well ... hardly ever.} But I digress.

In the form's "OnCurrent" event, you would look at the Yes/No field and make something either visible or not. Put your icon on the form as an Image Control with a constant pointer to your warning icon. I don't know what else you are doing in the OnCurrent event, but one line of VBA is required; it might be as simple as:

[WarningIcon].Visible = [NeedIcon]

where the [WarningIcon] is the control and the [NeedIcon] is the yes/no field. It might take a little more than this, but not a LOT more...
 
Yeah I got that, but that would enable the icon on every record on a continuous form, wouldn't it?
 
There are posts describing variable formatting in continuous forms. You can search for that topic. Your "embedded icon" solution would have had the same effect, wouldn't it?
 
Yeah I got it sorted out, I just place a "!" in the calculated field, and then format it on the form, simple but it works :P
 

Users who are viewing this thread

Back
Top Bottom