Well where are you getting the Field from?? You need to tell access what table it is comming from using the data from a form or from a recordset you open in the Code.
The If then else looks fine other than the Field thing...
AND ...
Use [ code ] and [/ Code ] without the spaces when you post code... It keeps the indenting.
Thanks for the code namilam, I tried it but it doesn't seem to want to work, I till get syntax errors.
I think I need to approach this from a different angle now anyway, i've had another look at what im trying to do this morning and im not sure how its possible.
A bit more background on what I am after...
I have a form that shows multiple records, for each record there are a number of hidden txtbox's that become visible dependent on values in the table. The expressions for these txtbox's are written as
Code:
=IIf([Data_Dir],"There is Data","There is No Data")
That does exactly what I want, if there is a entry in the table for "Data_Dir" then it displays "There is Data" if not then I get " There is No Data".
I have tried recreating this with an image but it doesn't seem possible as its wanting me to put it to an event i.e OnClick do this... where as I need to it display individually for each record that is being shown without the need for a click or a mouse over etc.
I wrote a sub in VB but this sets the image up for a single record which is then propergated to all the other records on display which isn't what im after
What would be the best way to acheive what I am wanting to do?