473,396 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Controlling Object properties in report

4
I am trying to control the visibility property of an object based on it's value.

The name of the object is MyObject (unbound text field). The field that controls it's visibility is a logical and it's named [Enabled].

In the control source of [MyObject] I placed the following expression:

=iif([Enabled], [MyObject].visible = True, [MyObject].visible = False]

This is not working. I tried manipulating several different properties such as color and border and in either case nothing happens.
Jun 18 '07 #1
6 1494
Rabbit
12,516 Expert Mod 8TB
I am trying to control the visibility property of an object based on it's value.

The name of the object is MyObject (unbound text field). The field that controls it's visibility is a logical and it's named [Enabled].

In the control source of [MyObject] I placed the following expression:

=iif([Enabled], [MyObject].visible = True, [MyObject].visible = False]

This is not working. I tried manipulating several different properties such as color and border and in either case nothing happens.
I don't think you can do it in an expression. You'll need to do it through the code builder, most likely in the On Render event.
Jun 18 '07 #2
e34m5
4
No such event in a report. I am really hating Access. I have never had such issues in other development languages.
Jun 18 '07 #3
Rabbit
12,516 Expert Mod 8TB
No such event in a report. I am really hating Access. I have never had such issues in other development languages.
Try the on open event then. I could've sworn there was an On Render event.
Jun 18 '07 #4
e34m5
4
Nope.

Nothing in VB seems to follow standard dot notation.
Jun 18 '07 #5
Rabbit
12,516 Expert Mod 8TB
Nope.

Nothing in VB seems to follow standard dot notation.
What code did you use? Can you post it here?
Jun 18 '07 #6
nico5038
3,080 Expert 2GB
Try the OnFormat event of the detail(?) section holding the control like:

Expand|Select|Wrap|Line Numbers
  1. IF Me![Enabled] then
  2.  Me![MyObject].visible = True
  3. else
  4.  [MyObject].visible = False
  5. endif
  6.  
Nic;o)
Jun 18 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: dixie | last post by:
I have a report with a subreport. The source object for this subreport varies according to the value of a field in a table. I am trying to programmatically set the object source for the subreport...
8
by: deko | last post by:
I'm hoping someone can sanity check my understanding of the Object Model for Forms/Controls. I'm having trouble drilling down into Control properties. First, I have a record set with the...
8
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
1
by: Phil Galey | last post by:
I'm using XMLSerializer in VB.NET to serialize class-based objects to XML. It's serializing fine, except that I don't seem to have control over the order in which the various fields (properties) of...
7
by: MLH | last post by:
The Me object in A97 HELP is associated with forms. I've used Me.Name with success in a report's Open event code successfully. However, I seem to recall occasions where use of Me in report...
0
by: Sajit | last post by:
I am trying to use an Excel file as a template for an Access report. I Linked the Excel file through an unbound frame as an OLE object with the properties set as follows: Source Doc...
0
by: PC GROUP | last post by:
C#, VS2005, THREADS Ok. I have to ways to achieve (almost) the same thing. What do i want to do? Control the progress of an operation in a different project of my application. ...
1
by: Thorben Grosser | last post by:
Hello newsgroup, I'm finally done with my folder-archiving tool, still there are some flaws. To label the folders, I use a Dymo LabelWriter 400 printer which works great for my purposes. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.