473,473 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Conditional state of a record

aww
Hi,

I have four records displayed for one client with four different dates and
four different services. One of those services requires I send additional
information.

I created a query that labels the special service with "Attached", while
the other services are labeled "None":
IIF([service]="64","Attached","None").

I tried to set a control in my report that would display the words
"Attached" if the special service happen to occur.

However the problem seems to be that Access selects the label at random. So
even if the special service occurs, my control displays "None".

Any ideas will be greatly appreciated.

aww
--
Many Thanks!
Nov 12 '05 #1
4 1219
aww <aww@no_spam.com> wrote in
news:EA*****************@newsread1.news.pas.earthl ink.net:
Hi,

I have four records displayed for one client with four
different dates and four different services. One of those
services requires I send additional information.

I created a query that labels the special service with
"Attached", while the other services are labeled "None":
IIF([service]="64","Attached","None").
This implies that service is a field in the table of type text.
The entry "64" leads me to suspect that it may be defined as a
number in the table. If this is the case, modify the IIF to check
IIF(service = 64, "Attached", "None")

Bob Q.


I tried to set a control in my report that would display the
words "Attached" if the special service happen to occur.

However the problem seems to be that Access selects the label
at random. So even if the special service occurs, my control
displays "None".

Any ideas will be greatly appreciated.

aww


Nov 12 '05 #2
DFS
"aww" <aww@no_spam.com> wrote in message
news:EA*****************@newsread1.news.pas.earthl ink.net...
Hi,

I have four records displayed for one client with four different dates and
four different services. One of those services requires I send additional
information.

I created a query that labels the special service with "Attached", while
the other services are labeled "None":
IIF([service]="64","Attached","None").

aww,

If your report uses that query (you didn't show the whole thing), just bind
a text box on the report to the column resulting from the iif() statement.



I tried to set a control in my report that would display the words
"Attached" if the special service happen to occur.

However the problem seems to be that Access selects the label at random. So even if the special service occurs, my control displays "None".

Any ideas will be greatly appreciated.

aww
--
Many Thanks!

Nov 12 '05 #3
aww
DFS wrote:
aww,

If your report uses that query (you didn't show the whole thing), just
bind a text box on the report to the column resulting from the iif()
statement.


Hi DFS,

The report does use the query. The query is based on a one-2-many
relationship: A recordset displays one client, and also displays many (4)
services for said client. Ofcourse, only the selected client is shown.

The query has an expression that "marks" each of the services provided:

=============================
|Client | service | Mark |
=============================
| 1234 | 61 | None |
| 1234 | 64 | Attached |
| 1234 | 67 | None |
| 1234 | 69 | None |
-----------------------------

The report has a textbox which binds the field "Mark". However, it will
randomly display any of the labels instead of just the "Attached" label, I
haven't figured out how show ONLY this label.

--
Many Thanks!
Nov 12 '05 #4
aww
aww wrote:
Hi,

I have four records displayed for one client with four different dates and
four different services. One of those services requires I send additional
information.

I created a query that labels the special service with "Attached", while
the other services are labeled "None":
IIF([service]="64","Attached","None").

I tried to set a control in my report that would display the words
"Attached" if the special service happen to occur.

However the problem seems to be that Access selects the label at random.
So even if the special service occurs, my control displays "None".

Any ideas will be greatly appreciated.

aww


I've come up with a good solution.

In the query that populates the report, I created a calculated field with
the following:

Mark: IIf([service]= "64","2","1")

Then I used this field to manipulate the control in the report:

=IIf(Max([Mark]="2","Attached","None")
--
Many Thanks!
Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Allan Koch | last post by:
Dear NG, I would like to format a record in a subform, dependent on a value in one field. If one field in the record I show in a subform (datasheet view) is true I like to view that particular...
4
by: Bradley | last post by:
I have an A2000 database in which I have a continuous form with a tick box. There is also a text box with a conditional format that is based on the expression , if it's true then change the...
4
by: Bradley | last post by:
I have an A2000 database in which I have a continuous form with a tick box. There is also a text box with a conditional format that is based on the expression , if it's true then change the...
8
by: Dimitri Furman | last post by:
Given: Access 2002/2003 A subform in datasheet or continuous view, placed on a tab page (this last may or may not matter) Conditional formatting applied to some controls on the subform - format...
4
by: slinky | last post by:
Thanks in advance... I have a continuous style form with a field for each record called "STATUS". I simply want to have the form load and if the value of the textbox is "Inactive" I want the...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
1
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.