Trouble with Isvisible

SirDrums

Registered User.
Local time
Today, 01:23
Joined
Jul 15, 2009
Messages
83
I have a report that needs some duplicates hidden and others not. After searching the net I found the IsVisible variable. I am having a hard time getting the thing to work even though it seems straight foward.

I read that I need to put this code into the control source for my text box:

=IIf(OrderID.IsVisible,[OrderDate],Null)

Now I figured all I would have to do is replace OrderID and Orderdate with what I needed filtered on my report. I think that those are name of the text boxes right? So I put in the names of the text boxes in my report:

=IIf(OF LINE.IsVisible,[ON DRAWING],Null)

I get a syntax error when I try to use this.

So I figured that it doesnt like spaces. I took out the spaces in the names of the text boxes and re-entered the names into the command. It automatically changed the code to look like this:

=IIf([OFLINE].[IsVisible],[ONDRAWING],Null)

Which or course just gives you a bunch of boxes asking for input when you run the report.

So I tried different combinations, thinking that perhaps its not the text box name I need but the actual field name in the query etc etc all with the same results.

Can some please tell me what I am doing wrong?

Thanks!
 
You only need brackets, if your control (or table or query) contains non-standard characters (including space). Brackets do not hurt around names of DB objects, but they do harm if used on properties (like IsVisible). As you have removed the spaces from the object names (good practice anyhow), you do not need them at all.
These versions should work:

=IIf([OFLINE].IsVisible,[ONDRAWING],Null)
=IIf(OFLINE.IsVisible,ONDRAWING,Null)

HTH
Thomas
 
Thanks for the info. I have it working now!

Though I do have a new question about duplicate tags.

My report is listing Linenumbers and what we call runs. Each run can have a TO value and a From Value which causes duplication. Perhaps its better to show you:


Line2501
Run 001
 
Thanks for the response. I now have the field I want only showing up when there is a change in a specified field. Thanks!

Though now I have a new question.
In the same report I have line numbers and these line numbers have what we call runs associated with them. These runs can have a field with a TO value and a FROM value which cuase the run number to duplicate. Perhaps its better to show you guys:

Line 2501
Run 001 From Line 3301
Run 001 To Line 33401
Run 002 From Line 5306
Run 002 To Line 5406

Line 2601
Run 001 From Line 2201
Run 001 To Line 22401
Run 002 From Line 3806
Run 002 To Line 3806


What I would like to see is the run numbers not duplicate so it would look so so:

Line 2501
Run 001 From Line 3301
--------To Line 33401
Run 002 From Line 5306
--------To Line 5406

Line 2601
Run 001 From Line 2201
--------To Line 22401
Run 002 From Line 3806
--------To Line 3806


The problem is that when I set Hide duplicates to Yes I get this:

Line 2501
Run 001 From Line 3301
--------To Line 33401
Run 002 From Line 5306
--------To Line 5406

Line 2601
--------From Line 2201
--------To Line 22401
--------From Line 3806
--------To Line 3806


Is there a way to get the runs to look the way I have them in the second example?

Thanks!
 

Users who are viewing this thread

Back
Top Bottom