Printing Option Group Literals on Report

  • Thread starter Thread starter Scott A
  • Start date Start date
S

Scott A

Still trying to get text equivalents for option group
values to display on a report. My option group stores
three values, two of which I would like to translate into
text eqivalents on a report.

In the Control Source of the text box on the report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On Equipment", IIf
([InvoiceLabelLocation]=2, "In Documentation))

where InvoiceLabelLocation is the field returned by the
query upon which the report is based.

I have tried several variants of this expression, all
resulting in my personal favourite, "The expression you
entered contains invalid syntax" error.

Any assistance in modifying this expression would be
greatly appreciated.

Scott A
 
Did you try:
=Choose([InvoiceLabelLocation], "On Equipment", "In Documentation",
[Comment] )
 
I tried it, but am still getting a syntax error (and more
grey hair!)

I'm using Access 2000, if it makes any difference.

Here's where I stand right now:
1. I've copied the expression into the Control Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon which the report is
based that will return one of three values, (1,2,3), and
has a data type of Number, Integer.

3. I'm also returning a Comment field in the query

I'm not very good with expressions, as I've found very
little resource material that describes them well. If I
understand the function of the Choose expression, it
should automatically select the item from the
parenthetical that corresponds to the integer returned by
the query? In other words, if the value of
InvoiceLabelLocation is 1, then the first literal enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the second, and (wild
guess here) if 3, then it will display the Comment value
from the field list?

Anything else I can think of??? The report is based on a
query, and all of the fields are returned by the query,
but the InvoiceLabelLocation and Comment fields do come
from different source tables. I may be grasping at
straws, but I know there must be a way to make this work
(It all seems so very simple).

If you have any additional suggestions for making this
work, I would appreciate it very much!

Scott A



-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On Equipment", "In Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


Scott A said:
Still trying to get text equivalents for option group
values to display on a report. My option group stores
three values, two of which I would like to translate into
text eqivalents on a report.

In the Control Source of the text box on the report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On Equipment", IIf
([InvoiceLabelLocation]=2, "In Documentation))

where InvoiceLabelLocation is the field returned by the
query upon which the report is based.

I have tried several variants of this expression, all
resulting in my personal favourite, "The expression you
entered contains invalid syntax" error.

Any assistance in modifying this expression would be
greatly appreciated.

Scott A


.
 
You did include the "="?

--
Duane Hookom
MS Access MVP


Scott A said:
I tried it, but am still getting a syntax error (and more
grey hair!)

I'm using Access 2000, if it makes any difference.

Here's where I stand right now:
1. I've copied the expression into the Control Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon which the report is
based that will return one of three values, (1,2,3), and
has a data type of Number, Integer.

3. I'm also returning a Comment field in the query

I'm not very good with expressions, as I've found very
little resource material that describes them well. If I
understand the function of the Choose expression, it
should automatically select the item from the
parenthetical that corresponds to the integer returned by
the query? In other words, if the value of
InvoiceLabelLocation is 1, then the first literal enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the second, and (wild
guess here) if 3, then it will display the Comment value
from the field list?

Anything else I can think of??? The report is based on a
query, and all of the fields are returned by the query,
but the InvoiceLabelLocation and Comment fields do come
from different source tables. I may be grasping at
straws, but I know there must be a way to make this work
(It all seems so very simple).

If you have any additional suggestions for making this
work, I would appreciate it very much!

Scott A



-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On Equipment", "In Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


Scott A said:
Still trying to get text equivalents for option group
values to display on a report. My option group stores
three values, two of which I would like to translate into
text eqivalents on a report.

In the Control Source of the text box on the report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On Equipment", IIf
([InvoiceLabelLocation]=2, "In Documentation))

where InvoiceLabelLocation is the field returned by the
query upon which the report is based.

I have tried several variants of this expression, all
resulting in my personal favourite, "The expression you
entered contains invalid syntax" error.

Any assistance in modifying this expression would be
greatly appreciated.

Scott A


.
 
absolutely - still no success...
-----Original Message-----
You did include the "="?

--
Duane Hookom
MS Access MVP


Scott A said:
I tried it, but am still getting a syntax error (and more
grey hair!)

I'm using Access 2000, if it makes any difference.

Here's where I stand right now:
1. I've copied the expression into the Control Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon which the report is
based that will return one of three values, (1,2,3), and
has a data type of Number, Integer.

3. I'm also returning a Comment field in the query

I'm not very good with expressions, as I've found very
little resource material that describes them well. If I
understand the function of the Choose expression, it
should automatically select the item from the
parenthetical that corresponds to the integer returned by
the query? In other words, if the value of
InvoiceLabelLocation is 1, then the first literal enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the second, and (wild
guess here) if 3, then it will display the Comment value
from the field list?

Anything else I can think of??? The report is based on a
query, and all of the fields are returned by the query,
but the InvoiceLabelLocation and Comment fields do come
from different source tables. I may be grasping at
straws, but I know there must be a way to make this work
(It all seems so very simple).

If you have any additional suggestions for making this
work, I would appreciate it very much!

Scott A



-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On Equipment", "In Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


Still trying to get text equivalents for option group
values to display on a report. My option group stores
three values, two of which I would like to translate into
text eqivalents on a report.

In the Control Source of the text box on the report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On Equipment", IIf
([InvoiceLabelLocation]=2, "In Documentation))

where InvoiceLabelLocation is the field returned by the
query upon which the report is based.

I have tried several variants of this expression, all
resulting in my personal favourite, "The expression you
entered contains invalid syntax" error.

Any assistance in modifying this expression would be
greatly appreciated.

Scott A


.


.
 
Have you checked your references? Open any code module and select
Tools|References to see if any are MISSING. If so, uncheck them and attempt
to compile the project.

--
Duane Hookom
Microsoft Access MVP


Scott A said:
absolutely - still no success...
-----Original Message-----
You did include the "="?

--
Duane Hookom
MS Access MVP


Scott A said:
I tried it, but am still getting a syntax error (and more
grey hair!)

I'm using Access 2000, if it makes any difference.

Here's where I stand right now:
1. I've copied the expression into the Control Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon which the report is
based that will return one of three values, (1,2,3), and
has a data type of Number, Integer.

3. I'm also returning a Comment field in the query

I'm not very good with expressions, as I've found very
little resource material that describes them well. If I
understand the function of the Choose expression, it
should automatically select the item from the
parenthetical that corresponds to the integer returned by
the query? In other words, if the value of
InvoiceLabelLocation is 1, then the first literal enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the second, and (wild
guess here) if 3, then it will display the Comment value
from the field list?

Anything else I can think of??? The report is based on a
query, and all of the fields are returned by the query,
but the InvoiceLabelLocation and Comment fields do come
from different source tables. I may be grasping at
straws, but I know there must be a way to make this work
(It all seems so very simple).

If you have any additional suggestions for making this
work, I would appreciate it very much!

Scott A




-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On Equipment", "In
Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


Still trying to get text equivalents for option group
values to display on a report. My option group stores
three values, two of which I would like to translate
into
text eqivalents on a report.

In the Control Source of the text box on the report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On Equipment", IIf
([InvoiceLabelLocation]=2, "In Documentation))

where InvoiceLabelLocation is the field returned by the
query upon which the report is based.

I have tried several variants of this expression, all
resulting in my personal favourite, "The expression you
entered contains invalid syntax" error.

Any assistance in modifying this expression would be
greatly appreciated.

Scott A


.


.
 
I'm using VBA, Acces 9.0 Objects, DAO 3.6, ADO 2.1, OLE
Automation, and an Active X calendar control (9.0)

Which library is required to run this expression (I only
activate the ones required to run the DB).

-----Original Message-----
Have you checked your references? Open any code module and select
Tools|References to see if any are MISSING. If so, uncheck them and attempt
to compile the project.

--
Duane Hookom
Microsoft Access MVP


Scott A said:
absolutely - still no success...
-----Original Message-----
You did include the "="?

--
Duane Hookom
MS Access MVP


I tried it, but am still getting a syntax error (and more
grey hair!)

I'm using Access 2000, if it makes any difference.

Here's where I stand right now:
1. I've copied the expression into the Control Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon which the
report
is
based that will return one of three values, (1,2,3), and
has a data type of Number, Integer.

3. I'm also returning a Comment field in the query

I'm not very good with expressions, as I've found very
little resource material that describes them well. If I
understand the function of the Choose expression, it
should automatically select the item from the
parenthetical that corresponds to the integer
returned
by
the query? In other words, if the value of
InvoiceLabelLocation is 1, then the first literal enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the second, and (wild
guess here) if 3, then it will display the Comment value
from the field list?

Anything else I can think of??? The report is based
on
a
query, and all of the fields are returned by the query,
but the InvoiceLabelLocation and Comment fields do come
from different source tables. I may be grasping at
straws, but I know there must be a way to make this work
(It all seems so very simple).

If you have any additional suggestions for making this
work, I would appreciate it very much!

Scott A




-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On Equipment", "In
Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


Still trying to get text equivalents for option group
values to display on a report. My option group stores
three values, two of which I would like to translate
into
text eqivalents on a report.

In the Control Source of the text box on the report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On Equipment", IIf
([InvoiceLabelLocation]=2, "In Documentation))

where InvoiceLabelLocation is the field returned
by
the
query upon which the report is based.

I have tried several variants of this expression, all
resulting in my personal favourite, "The
expression
you
entered contains invalid syntax" error.

Any assistance in modifying this expression would be
greatly appreciated.

Scott A


.



.


.
 
This is amazingly frustrating. I tried entering the
expression in a field on my home computer and was able to
exit the field without getting an error, but can't get the
code to work at the office (where I obviously need it
more!)

Here at the office I've checked for missing reference (all
are present and accounted for), and compiled the VBA
project code. Now I've tried the expression again and
still get the same error...

I see no reason why this shouldn't work - and I've retyped
every character.
-----Original Message-----
I'm using VBA, Acces 9.0 Objects, DAO 3.6, ADO 2.1, OLE
Automation, and an Active X calendar control (9.0)

Which library is required to run this expression (I only
activate the ones required to run the DB).

-----Original Message-----
Have you checked your references? Open any code module and select
Tools|References to see if any are MISSING. If so, uncheck them and attempt
to compile the project.

--
Duane Hookom
Microsoft Access MVP


Scott A said:
absolutely - still no success...

-----Original Message-----
You did include the "="?

--
Duane Hookom
MS Access MVP


I tried it, but am still getting a syntax error (and
more
grey hair!)

I'm using Access 2000, if it makes any difference.

Here's where I stand right now:
1. I've copied the expression into the Control Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon which the report
is
based that will return one of three values, (1,2,3),
and
has a data type of Number, Integer.

3. I'm also returning a Comment field in the query

I'm not very good with expressions, as I've found very
little resource material that describes them well. If I
understand the function of the Choose expression, it
should automatically select the item from the
parenthetical that corresponds to the integer returned
by
the query? In other words, if the value of
InvoiceLabelLocation is 1, then the first literal
enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the second, and
(wild
guess here) if 3, then it will display the Comment
value
from the field list?

Anything else I can think of??? The report is based on
a
query, and all of the fields are returned by the query,
but the InvoiceLabelLocation and Comment fields do come
from different source tables. I may be grasping at
straws, but I know there must be a way to make this
work
(It all seems so very simple).

If you have any additional suggestions for making this
work, I would appreciate it very much!

Scott A




-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On Equipment", "In
Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


Still trying to get text equivalents for option
group
values to display on a report. My option group
stores
three values, two of which I would like to translate
into
text eqivalents on a report.

In the Control Source of the text box on the
report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On Equipment", IIf
([InvoiceLabelLocation]=2, "In Documentation))

where InvoiceLabelLocation is the field returned by
the
query upon which the report is based.

I have tried several variants of this expression,
all
resulting in my personal favourite, "The expression
you
entered contains invalid syntax" error.

Any assistance in modifying this expression would be
greatly appreciated.

Scott A


.



.


.
.
 
Do you have the Calendar control loaded on your work pc?

--
Duane Hookom
MS Access MVP


Scott A said:
This is amazingly frustrating. I tried entering the
expression in a field on my home computer and was able to
exit the field without getting an error, but can't get the
code to work at the office (where I obviously need it
more!)

Here at the office I've checked for missing reference (all
are present and accounted for), and compiled the VBA
project code. Now I've tried the expression again and
still get the same error...

I see no reason why this shouldn't work - and I've retyped
every character.
-----Original Message-----
I'm using VBA, Acces 9.0 Objects, DAO 3.6, ADO 2.1, OLE
Automation, and an Active X calendar control (9.0)

Which library is required to run this expression (I only
activate the ones required to run the DB).

-----Original Message-----
Have you checked your references? Open any code module and select
Tools|References to see if any are MISSING. If so, uncheck them and attempt
to compile the project.

--
Duane Hookom
Microsoft Access MVP


absolutely - still no success...

-----Original Message-----
You did include the "="?

--
Duane Hookom
MS Access MVP


I tried it, but am still getting a syntax error (and
more
grey hair!)

I'm using Access 2000, if it makes any difference.

Here's where I stand right now:
1. I've copied the expression into the Control Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon which the report
is
based that will return one of three values, (1,2,3),
and
has a data type of Number, Integer.

3. I'm also returning a Comment field in the query

I'm not very good with expressions, as I've found very
little resource material that describes them well. If I
understand the function of the Choose expression, it
should automatically select the item from the
parenthetical that corresponds to the integer returned
by
the query? In other words, if the value of
InvoiceLabelLocation is 1, then the first literal
enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the second, and
(wild
guess here) if 3, then it will display the Comment
value
from the field list?

Anything else I can think of??? The report is based on
a
query, and all of the fields are returned by the query,
but the InvoiceLabelLocation and Comment fields do come
from different source tables. I may be grasping at
straws, but I know there must be a way to make this
work
(It all seems so very simple).

If you have any additional suggestions for making this
work, I would appreciate it very much!

Scott A




-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On Equipment", "In
Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


Still trying to get text equivalents for option
group
values to display on a report. My option group
stores
three values, two of which I would like to translate
into
text eqivalents on a report.

In the Control Source of the text box on the
report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On Equipment", IIf
([InvoiceLabelLocation]=2, "In Documentation))

where InvoiceLabelLocation is the field returned by
the
query upon which the report is based.

I have tried several variants of this expression,
all
resulting in my personal favourite, "The expression
you
entered contains invalid syntax" error.

Any assistance in modifying this expression would be
greatly appreciated.

Scott A


.



.



.
.
 
If you reference the Calendar library on one PC but not the other, this can
often cause issues with code and expressions. This may also happen with
different versions of libraries. This is one reason I rarely if ever use
other controls. I have a calendar form that I either created or stole from
someplace that I use in place of the calendar control.

--
Duane Hookom
Microsoft Access MVP


Scott A said:
Yes I do. Is there a conflict?

-----Original Message-----
Do you have the Calendar control loaded on your work pc?

--
Duane Hookom
MS Access MVP


Scott A said:
This is amazingly frustrating. I tried entering the
expression in a field on my home computer and was able to
exit the field without getting an error, but can't get the
code to work at the office (where I obviously need it
more!)

Here at the office I've checked for missing reference (all
are present and accounted for), and compiled the VBA
project code. Now I've tried the expression again and
still get the same error...

I see no reason why this shouldn't work - and I've retyped
every character.
-----Original Message-----
I'm using VBA, Acces 9.0 Objects, DAO 3.6, ADO 2.1, OLE
Automation, and an Active X calendar control (9.0)

Which library is required to run this expression (I only
activate the ones required to run the DB).


-----Original Message-----
Have you checked your references? Open any code module
and select
Tools|References to see if any are MISSING. If so,
uncheck them and attempt
to compile the project.

--
Duane Hookom
Microsoft Access MVP


absolutely - still no success...

-----Original Message-----
You did include the "="?

--
Duane Hookom
MS Access MVP


message
I tried it, but am still getting a syntax error (and
more
grey hair!)

I'm using Access 2000, if it makes any difference.

Here's where I stand right now:
1. I've copied the expression into the Control
Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon which the
report
is
based that will return one of three values, (1,2,3),
and
has a data type of Number, Integer.

3. I'm also returning a Comment field in the query

I'm not very good with expressions, as I've found
very
little resource material that describes them well.
If I
understand the function of the Choose expression, it
should automatically select the item from the
parenthetical that corresponds to the integer
returned
by
the query? In other words, if the value of
InvoiceLabelLocation is 1, then the first literal
enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the second, and
(wild
guess here) if 3, then it will display the Comment
value
from the field list?

Anything else I can think of??? The report is based
on
a
query, and all of the fields are returned by the
query,
but the InvoiceLabelLocation and Comment fields do
come
from different source tables. I may be grasping at
straws, but I know there must be a way to make this
work
(It all seems so very simple).

If you have any additional suggestions for making
this
work, I would appreciate it very much!

Scott A




-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On Equipment", "In
Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


Still trying to get text equivalents for option
group
values to display on a report. My option group
stores
three values, two of which I would like to
translate
into
text eqivalents on a report.

In the Control Source of the text box on the
report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On Equipment",
IIf
([InvoiceLabelLocation]=2, "In Documentation))

where InvoiceLabelLocation is the field returned
by
the
query upon which the report is based.

I have tried several variants of this expression,
all
resulting in my personal favourite, "The
expression
you
entered contains invalid syntax" error.

Any assistance in modifying this expression
would be
greatly appreciated.

Scott A


.



.



.

.


.
 
Is it something you would be willing to share?

I'd like to get rid of the one I'm using anyway. It has
some really user-unfriendly behaviors.
-----Original Message-----
If you reference the Calendar library on one PC but not the other, this can
often cause issues with code and expressions. This may also happen with
different versions of libraries. This is one reason I rarely if ever use
other controls. I have a calendar form that I either created or stole from
someplace that I use in place of the calendar control.

--
Duane Hookom
Microsoft Access MVP


Scott A said:
Yes I do. Is there a conflict?

-----Original Message-----
Do you have the Calendar control loaded on your work pc?

--
Duane Hookom
MS Access MVP


This is amazingly frustrating. I tried entering the
expression in a field on my home computer and was
able
to
exit the field without getting an error, but can't
get
the
code to work at the office (where I obviously need it
more!)

Here at the office I've checked for missing
reference
(all
are present and accounted for), and compiled the VBA
project code. Now I've tried the expression again and
still get the same error...

I see no reason why this shouldn't work - and I've retyped
every character.
-----Original Message-----
I'm using VBA, Acces 9.0 Objects, DAO 3.6, ADO 2.1, OLE
Automation, and an Active X calendar control (9.0)

Which library is required to run this expression (I only
activate the ones required to run the DB).


-----Original Message-----
Have you checked your references? Open any code module
and select
Tools|References to see if any are MISSING. If so,
uncheck them and attempt
to compile the project.

--
Duane Hookom
Microsoft Access MVP


absolutely - still no success...

-----Original Message-----
You did include the "="?

--
Duane Hookom
MS Access MVP


message
I tried it, but am still getting a syntax
error
(and
more
grey hair!)

I'm using Access 2000, if it makes any difference.

Here's where I stand right now:
1. I've copied the expression into the Control
Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon which the
report
is
based that will return one of three values, (1,2,3),
and
has a data type of Number, Integer.

3. I'm also returning a Comment field in the query

I'm not very good with expressions, as I've found
very
little resource material that describes them well.
If I
understand the function of the Choose expression, it
should automatically select the item from the
parenthetical that corresponds to the integer
returned
by
the query? In other words, if the value of
InvoiceLabelLocation is 1, then the first literal
enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the
second,
and
(wild
guess here) if 3, then it will display the Comment
value
from the field list?

Anything else I can think of??? The report is based
on
a
query, and all of the fields are returned by the
query,
but the InvoiceLabelLocation and Comment
fields
do
come
from different source tables. I may be grasping at
straws, but I know there must be a way to
make
this
work
(It all seems so very simple).

If you have any additional suggestions for making
this
work, I would appreciate it very much!

Scott A




-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On Equipment", "In
Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


[email protected]...
Still trying to get text equivalents for option
group
values to display on a report. My option group
stores
three values, two of which I would like to
translate
into
text eqivalents on a report.

In the Control Source of the text box on the
report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On Equipment",
IIf
([InvoiceLabelLocation]=2, "In Documentation))

where InvoiceLabelLocation is the field returned
by
the
query upon which the report is based.

I have tried several variants of this expression,
all
resulting in my personal favourite, "The
expression
you
entered contains invalid syntax" error.

Any assistance in modifying this expression
would be
greatly appreciated.

Scott A


.



.



.

.



.


.
 
I think I got the form from an Access Developers Handbook by Getz,
Reddick,... It wouldn't be appropriate to share. The book is well worth the
price.

--
Duane Hookom
MS Access MVP


Scott A said:
Is it something you would be willing to share?

I'd like to get rid of the one I'm using anyway. It has
some really user-unfriendly behaviors.
-----Original Message-----
If you reference the Calendar library on one PC but not the other, this can
often cause issues with code and expressions. This may also happen with
different versions of libraries. This is one reason I rarely if ever use
other controls. I have a calendar form that I either created or stole from
someplace that I use in place of the calendar control.

--
Duane Hookom
Microsoft Access MVP


Scott A said:
Yes I do. Is there a conflict?


-----Original Message-----
Do you have the Calendar control loaded on your work pc?

--
Duane Hookom
MS Access MVP


This is amazingly frustrating. I tried entering the
expression in a field on my home computer and was able
to
exit the field without getting an error, but can't get
the
code to work at the office (where I obviously need it
more!)

Here at the office I've checked for missing reference
(all
are present and accounted for), and compiled the VBA
project code. Now I've tried the expression again and
still get the same error...

I see no reason why this shouldn't work - and I've
retyped
every character.
-----Original Message-----
I'm using VBA, Acces 9.0 Objects, DAO 3.6, ADO 2.1,
OLE
Automation, and an Active X calendar control (9.0)

Which library is required to run this expression (I
only
activate the ones required to run the DB).


-----Original Message-----
Have you checked your references? Open any code
module
and select
Tools|References to see if any are MISSING. If so,
uncheck them and attempt
to compile the project.

--
Duane Hookom
Microsoft Access MVP


absolutely - still no success...

-----Original Message-----
You did include the "="?

--
Duane Hookom
MS Access MVP


message
I tried it, but am still getting a syntax error
(and
more
grey hair!)

I'm using Access 2000, if it makes any
difference.

Here's where I stand right now:
1. I've copied the expression into the Control
Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon which the
report
is
based that will return one of three values,
(1,2,3),
and
has a data type of Number, Integer.

3. I'm also returning a Comment field in the
query

I'm not very good with expressions, as I've
found
very
little resource material that describes them
well.
If I
understand the function of the Choose
expression, it
should automatically select the item from the
parenthetical that corresponds to the integer
returned
by
the query? In other words, if the value of
InvoiceLabelLocation is 1, then the first
literal
enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the second,
and
(wild
guess here) if 3, then it will display the
Comment
value
from the field list?

Anything else I can think of??? The report is
based
on
a
query, and all of the fields are returned by the
query,
but the InvoiceLabelLocation and Comment fields
do
come
from different source tables. I may be
grasping at
straws, but I know there must be a way to make
this
work
(It all seems so very simple).

If you have any additional suggestions for
making
this
work, I would appreciate it very much!

Scott A




-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On
Equipment", "In
Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


message
[email protected]...
Still trying to get text equivalents for
option
group
values to display on a report. My option
group
stores
three values, two of which I would like to
translate
into
text eqivalents on a report.

In the Control Source of the text box on the
report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On
Equipment",
IIf
([InvoiceLabelLocation]=2, "In
Documentation))

where InvoiceLabelLocation is the field
returned
by
the
query upon which the report is based.

I have tried several variants of this
expression,
all
resulting in my personal favourite, "The
expression
you
entered contains invalid syntax" error.

Any assistance in modifying this expression
would be
greatly appreciated.

Scott A


.



.



.

.



.


.
 
Understood - I'll check it out.

For testing purposes, will it be enough to de-select the
library from my references list, or do I have to to
something else to remove it?
-----Original Message-----
I think I got the form from an Access Developers Handbook by Getz,
Reddick,... It wouldn't be appropriate to share. The book is well worth the
price.

--
Duane Hookom
MS Access MVP


Scott A said:
Is it something you would be willing to share?

I'd like to get rid of the one I'm using anyway. It has
some really user-unfriendly behaviors.
-----Original Message-----
If you reference the Calendar library on one PC but
not
the other, this can
often cause issues with code and expressions. This may also happen with
different versions of libraries. This is one reason I rarely if ever use
other controls. I have a calendar form that I either created or stole from
someplace that I use in place of the calendar control.

--
Duane Hookom
Microsoft Access MVP


Yes I do. Is there a conflict?


-----Original Message-----
Do you have the Calendar control loaded on your
work
pc?
--
Duane Hookom
MS Access MVP


This is amazingly frustrating. I tried entering the
expression in a field on my home computer and was able
to
exit the field without getting an error, but
can't
get
the
code to work at the office (where I obviously
need
it
more!)

Here at the office I've checked for missing reference
(all
are present and accounted for), and compiled the VBA
project code. Now I've tried the expression
again
and
still get the same error...

I see no reason why this shouldn't work - and I've
retyped
every character.
-----Original Message-----
I'm using VBA, Acces 9.0 Objects, DAO 3.6, ADO 2.1,
OLE
Automation, and an Active X calendar control (9.0)

Which library is required to run this expression (I
only
activate the ones required to run the DB).


-----Original Message-----
Have you checked your references? Open any code
module
and select
Tools|References to see if any are MISSING. If so,
uncheck them and attempt
to compile the project.

--
Duane Hookom
Microsoft Access MVP


absolutely - still no success...

-----Original Message-----
You did include the "="?

--
Duane Hookom
MS Access MVP


"Scott A" <[email protected]>
wrote
in
message
[email protected]...
I tried it, but am still getting a syntax error
(and
more
grey hair!)

I'm using Access 2000, if it makes any
difference.

Here's where I stand right now:
1. I've copied the expression into the Control
Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon
which
the
report
is
based that will return one of three values,
(1,2,3),
and
has a data type of Number, Integer.

3. I'm also returning a Comment field in the
query

I'm not very good with expressions, as I've
found
very
little resource material that describes them
well.
If I
understand the function of the Choose
expression, it
should automatically select the item from the
parenthetical that corresponds to the integer
returned
by
the query? In other words, if the value of
InvoiceLabelLocation is 1, then the first
literal
enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the second,
and
(wild
guess here) if 3, then it will display the
Comment
value
from the field list?

Anything else I can think of??? The report is
based
on
a
query, and all of the fields are returned
by
the
query,
but the InvoiceLabelLocation and Comment fields
do
come
from different source tables. I may be
grasping at
straws, but I know there must be a way to make
this
work
(It all seems so very simple).

If you have any additional suggestions for
making
this
work, I would appreciate it very much!

Scott A




-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On
Equipment", "In
Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


message
[email protected]...
Still trying to get text equivalents for
option
group
values to display on a report. My option
group
stores
three values, two of which I would like to
translate
into
text eqivalents on a report.

In the Control Source of the text box
on
the
report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On
Equipment",
IIf
([InvoiceLabelLocation]=2, "In
Documentation))

where InvoiceLabelLocation is the field
returned
by
the
query upon which the report is based.

I have tried several variants of this
expression,
all
resulting in my personal favourite, "The
expression
you
entered contains invalid syntax" error.

Any assistance in modifying this expression
would be
greatly appreciated.

Scott A


.



.



.

.



.



.


.
 
the reason I ask is that I removed the reference to the MS
Calendar Control library, and still couldn't get this
expression to work.
-----Original Message-----
Understood - I'll check it out.

For testing purposes, will it be enough to de-select the
library from my references list, or do I have to to
something else to remove it?
-----Original Message-----
I think I got the form from an Access Developers Handbook by Getz,
Reddick,... It wouldn't be appropriate to share. The book is well worth the
price.

--
Duane Hookom
MS Access MVP


Scott A said:
Is it something you would be willing to share?

I'd like to get rid of the one I'm using anyway. It has
some really user-unfriendly behaviors.

-----Original Message-----
If you reference the Calendar library on one PC but not
the other, this can
often cause issues with code and expressions. This may
also happen with
different versions of libraries. This is one reason I
rarely if ever use
other controls. I have a calendar form that I either
created or stole from
someplace that I use in place of the calendar control.

--
Duane Hookom
Microsoft Access MVP


Yes I do. Is there a conflict?


-----Original Message-----
Do you have the Calendar control loaded on your work
pc?

--
Duane Hookom
MS Access MVP


This is amazingly frustrating. I tried entering the
expression in a field on my home computer and was
able
to
exit the field without getting an error, but can't
get
the
code to work at the office (where I obviously need
it
more!)

Here at the office I've checked for missing
reference
(all
are present and accounted for), and compiled the VBA
project code. Now I've tried the expression again
and
still get the same error...

I see no reason why this shouldn't work - and I've
retyped
every character.
-----Original Message-----
I'm using VBA, Acces 9.0 Objects, DAO 3.6, ADO 2.1,
OLE
Automation, and an Active X calendar control (9.0)

Which library is required to run this expression (I
only
activate the ones required to run the DB).


-----Original Message-----
Have you checked your references? Open any code
module
and select
Tools|References to see if any are MISSING. If so,
uncheck them and attempt
to compile the project.

--
Duane Hookom
Microsoft Access MVP


absolutely - still no success...

-----Original Message-----
You did include the "="?

--
Duane Hookom
MS Access MVP


in
message
[email protected]...
I tried it, but am still getting a syntax
error
(and
more
grey hair!)

I'm using Access 2000, if it makes any
difference.

Here's where I stand right now:
1. I've copied the expression into the
Control
Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon which
the
report
is
based that will return one of three values,
(1,2,3),
and
has a data type of Number, Integer.

3. I'm also returning a Comment field in the
query

I'm not very good with expressions, as I've
found
very
little resource material that describes them
well.
If I
understand the function of the Choose
expression, it
should automatically select the item from the
parenthetical that corresponds to the integer
returned
by
the query? In other words, if the value of
InvoiceLabelLocation is 1, then the first
literal
enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the
second,
and
(wild
guess here) if 3, then it will display the
Comment
value
from the field list?

Anything else I can think of??? The report is
based
on
a
query, and all of the fields are returned by
the
query,
but the InvoiceLabelLocation and Comment
fields
do
come
from different source tables. I may be
grasping at
straws, but I know there must be a way to
make
this
work
(It all seems so very simple).

If you have any additional suggestions for
making
this
work, I would appreciate it very much!

Scott A




-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On
Equipment", "In
Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


message
[email protected]...
Still trying to get text equivalents for
option
group
values to display on a report. My option
group
stores
three values, two of which I would like to
translate
into
text eqivalents on a report.

In the Control Source of the text box on
the
report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On
Equipment",
IIf
([InvoiceLabelLocation]=2, "In
Documentation))

where InvoiceLabelLocation is the field
returned
by
the
query upon which the report is based.

I have tried several variants of this
expression,
all
resulting in my personal favourite, "The
expression
you
entered contains invalid syntax" error.

Any assistance in modifying this
expression
would be
greatly appreciated.

Scott A


.



.



.

.



.



.


.
.
 
I think if you remove the reference to the library and have code that uses
the library, you will experience issues.
If I were you, I would create a new, blank mdb and import just the table(s)
that are required to produce a very limited experiment with the expression I
posted a while back. Test it. If it works in the new mdb then your issue is
not with the expression but with some other part of your application/mdb.

--
Duane Hookom
Microsoft Access MVP


Scott A said:
the reason I ask is that I removed the reference to the MS
Calendar Control library, and still couldn't get this
expression to work.
-----Original Message-----
Understood - I'll check it out.

For testing purposes, will it be enough to de-select the
library from my references list, or do I have to to
something else to remove it?
-----Original Message-----
I think I got the form from an Access Developers Handbook by Getz,
Reddick,... It wouldn't be appropriate to share. The book is well worth the
price.

--
Duane Hookom
MS Access MVP


Is it something you would be willing to share?

I'd like to get rid of the one I'm using anyway. It has
some really user-unfriendly behaviors.

-----Original Message-----
If you reference the Calendar library on one PC but not
the other, this can
often cause issues with code and expressions. This may
also happen with
different versions of libraries. This is one reason I
rarely if ever use
other controls. I have a calendar form that I either
created or stole from
someplace that I use in place of the calendar control.

--
Duane Hookom
Microsoft Access MVP


Yes I do. Is there a conflict?


-----Original Message-----
Do you have the Calendar control loaded on your work
pc?

--
Duane Hookom
MS Access MVP


This is amazingly frustrating. I tried entering the
expression in a field on my home computer and was
able
to
exit the field without getting an error, but can't
get
the
code to work at the office (where I obviously need
it
more!)

Here at the office I've checked for missing
reference
(all
are present and accounted for), and compiled the VBA
project code. Now I've tried the expression again
and
still get the same error...

I see no reason why this shouldn't work - and I've
retyped
every character.
-----Original Message-----
I'm using VBA, Acces 9.0 Objects, DAO 3.6, ADO 2.1,
OLE
Automation, and an Active X calendar control (9.0)

Which library is required to run this expression (I
only
activate the ones required to run the DB).


-----Original Message-----
Have you checked your references? Open any code
module
and select
Tools|References to see if any are MISSING. If so,
uncheck them and attempt
to compile the project.

--
Duane Hookom
Microsoft Access MVP


absolutely - still no success...

-----Original Message-----
You did include the "="?

--
Duane Hookom
MS Access MVP


in
message
news:256d401c38db6$70c30860
[email protected]...
I tried it, but am still getting a syntax
error
(and
more
grey hair!)

I'm using Access 2000, if it makes any
difference.

Here's where I stand right now:
1. I've copied the expression into the
Control
Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon which
the
report
is
based that will return one of three values,
(1,2,3),
and
has a data type of Number, Integer.

3. I'm also returning a Comment field in the
query

I'm not very good with expressions, as I've
found
very
little resource material that describes them
well.
If I
understand the function of the Choose
expression, it
should automatically select the item from the
parenthetical that corresponds to the integer
returned
by
the query? In other words, if the value of
InvoiceLabelLocation is 1, then the first
literal
enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the
second,
and
(wild
guess here) if 3, then it will display the
Comment
value
from the field list?

Anything else I can think of??? The report is
based
on
a
query, and all of the fields are returned by
the
query,
but the InvoiceLabelLocation and Comment
fields
do
come
from different source tables. I may be
grasping at
straws, but I know there must be a way to
make
this
work
(It all seems so very simple).

If you have any additional suggestions for
making
this
work, I would appreciate it very much!

Scott A




-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On
Equipment", "In
Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


message
[email protected]...
Still trying to get text equivalents for
option
group
values to display on a report. My option
group
stores
three values, two of which I would like to
translate
into
text eqivalents on a report.

In the Control Source of the text box on
the
report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On
Equipment",
IIf
([InvoiceLabelLocation]=2, "In
Documentation))

where InvoiceLabelLocation is the field
returned
by
the
query upon which the report is based.

I have tried several variants of this
expression,
all
resulting in my personal favourite, "The
expression
you
entered contains invalid syntax" error.

Any assistance in modifying this
expression
would be
greatly appreciated.

Scott A


.



.



.

.



.



.



.
.
 
I created a db file with only the source tables, the
query, and the report. No forms, no cal control, and still
(!) the expression doesn't work.

If you have any idea as to what might be wrong, I would
love to know...

Scott
-----Original Message-----
I think if you remove the reference to the library and have code that uses
the library, you will experience issues.
If I were you, I would create a new, blank mdb and import just the table(s)
that are required to produce a very limited experiment with the expression I
posted a while back. Test it. If it works in the new mdb then your issue is
not with the expression but with some other part of your application/mdb.

--
Duane Hookom
Microsoft Access MVP


Scott A said:
the reason I ask is that I removed the reference to the MS
Calendar Control library, and still couldn't get this
expression to work.
-----Original Message-----
Understood - I'll check it out.

For testing purposes, will it be enough to de-select the
library from my references list, or do I have to to
something else to remove it?

-----Original Message-----
I think I got the form from an Access Developers
Handbook by Getz,
Reddick,... It wouldn't be appropriate to share. The
book is well worth the
price.

--
Duane Hookom
MS Access MVP


Is it something you would be willing to share?

I'd like to get rid of the one I'm using anyway. It
has
some really user-unfriendly behaviors.

-----Original Message-----
If you reference the Calendar library on one PC but
not
the other, this can
often cause issues with code and expressions. This may
also happen with
different versions of libraries. This is one reason I
rarely if ever use
other controls. I have a calendar form that I either
created or stole from
someplace that I use in place of the calendar control.

--
Duane Hookom
Microsoft Access MVP


Yes I do. Is there a conflict?


-----Original Message-----
Do you have the Calendar control loaded on your
work
pc?

--
Duane Hookom
MS Access MVP


message
This is amazingly frustrating. I tried entering
the
expression in a field on my home computer and was
able
to
exit the field without getting an error, but
can't
get
the
code to work at the office (where I obviously
need
it
more!)

Here at the office I've checked for missing
reference
(all
are present and accounted for), and compiled the
VBA
project code. Now I've tried the expression
again
and
still get the same error...

I see no reason why this shouldn't work - and
I've
retyped
every character.
-----Original Message-----
I'm using VBA, Acces 9.0 Objects, DAO 3.6, ADO
2.1,
OLE
Automation, and an Active X calendar control
(9.0)

Which library is required to run this
expression (I
only
activate the ones required to run the DB).


-----Original Message-----
Have you checked your references? Open any code
module
and select
Tools|References to see if any are MISSING. If
so,
uncheck them and attempt
to compile the project.

--
Duane Hookom
Microsoft Access MVP


message
[email protected]...
absolutely - still no success...

-----Original Message-----
You did include the "="?

--
Duane Hookom
MS Access MVP


"Scott A" <[email protected]>
wrote
in
message
[email protected]...
I tried it, but am still getting a syntax
error
(and
more
grey hair!)

I'm using Access 2000, if it makes any
difference.

Here's where I stand right now:
1. I've copied the expression into the
Control
Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon
which
the
report
is
based that will return one of three
values,
(1,2,3),
and
has a data type of Number, Integer.

3. I'm also returning a Comment field in
the
query

I'm not very good with expressions, as
I've
found
very
little resource material that describes
them
well.
If I
understand the function of the Choose
expression, it
should automatically select the item from
the
parenthetical that corresponds to the
integer
returned
by
the query? In other words, if the value
of
InvoiceLabelLocation is 1, then the first
literal
enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the
second,
and
(wild
guess here) if 3, then it will display the
Comment
value
from the field list?

Anything else I can think of??? The
report is
based
on
a
query, and all of the fields are returned
by
the
query,
but the InvoiceLabelLocation and Comment
fields
do
come
from different source tables. I may be
grasping at
straws, but I know there must be a way to
make
this
work
(It all seems so very simple).

If you have any additional suggestions for
making
this
work, I would appreciate it very much!

Scott A




-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On
Equipment", "In
Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


message
[email protected]...
Still trying to get text equivalents
for
option
group
values to display on a report. My
option
group
stores
three values, two of which I would
like to
translate
into
text eqivalents on a report.

In the Control Source of the text box
on
the
report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On
Equipment",
IIf
([InvoiceLabelLocation]=2, "In
Documentation))

where InvoiceLabelLocation is the field
returned
by
the
query upon which the report is based.

I have tried several variants of this
expression,
all
resulting in my personal
favourite, "The
expression
you
entered contains invalid syntax" error.

Any assistance in modifying this
expression
would be
greatly appreciated.

Scott A


.



.



.

.



.



.



.

.


.
 
Are you sure you are storing a numeric value in your table?
You can email me privately and I will describe how you can send me your new
test mdb for me to look at (if you wish).
(e-mail address removed)

--
Duane Hookom
Microsoft Access MVP


Scott A said:
I created a db file with only the source tables, the
query, and the report. No forms, no cal control, and still
(!) the expression doesn't work.

If you have any idea as to what might be wrong, I would
love to know...

Scott
-----Original Message-----
I think if you remove the reference to the library and have code that uses
the library, you will experience issues.
If I were you, I would create a new, blank mdb and import just the table(s)
that are required to produce a very limited experiment with the expression I
posted a while back. Test it. If it works in the new mdb then your issue is
not with the expression but with some other part of your application/mdb.

--
Duane Hookom
Microsoft Access MVP


Scott A said:
the reason I ask is that I removed the reference to the MS
Calendar Control library, and still couldn't get this
expression to work.

-----Original Message-----
Understood - I'll check it out.

For testing purposes, will it be enough to de-select the
library from my references list, or do I have to to
something else to remove it?

-----Original Message-----
I think I got the form from an Access Developers
Handbook by Getz,
Reddick,... It wouldn't be appropriate to share. The
book is well worth the
price.

--
Duane Hookom
MS Access MVP


Is it something you would be willing to share?

I'd like to get rid of the one I'm using anyway. It
has
some really user-unfriendly behaviors.

-----Original Message-----
If you reference the Calendar library on one PC but
not
the other, this can
often cause issues with code and expressions. This may
also happen with
different versions of libraries. This is one reason I
rarely if ever use
other controls. I have a calendar form that I either
created or stole from
someplace that I use in place of the calendar control.

--
Duane Hookom
Microsoft Access MVP


Yes I do. Is there a conflict?


-----Original Message-----
Do you have the Calendar control loaded on your
work
pc?

--
Duane Hookom
MS Access MVP


message
This is amazingly frustrating. I tried entering
the
expression in a field on my home computer and was
able
to
exit the field without getting an error, but
can't
get
the
code to work at the office (where I obviously
need
it
more!)

Here at the office I've checked for missing
reference
(all
are present and accounted for), and compiled the
VBA
project code. Now I've tried the expression
again
and
still get the same error...

I see no reason why this shouldn't work - and
I've
retyped
every character.
-----Original Message-----
I'm using VBA, Acces 9.0 Objects, DAO 3.6, ADO
2.1,
OLE
Automation, and an Active X calendar control
(9.0)

Which library is required to run this
expression (I
only
activate the ones required to run the DB).


-----Original Message-----
Have you checked your references? Open any code
module
and select
Tools|References to see if any are MISSING. If
so,
uncheck them and attempt
to compile the project.

--
Duane Hookom
Microsoft Access MVP


message
[email protected]...
absolutely - still no success...

-----Original Message-----
You did include the "="?

--
Duane Hookom
MS Access MVP


"Scott A" <[email protected]>
wrote
in
message
[email protected]...
I tried it, but am still getting a syntax
error
(and
more
grey hair!)

I'm using Access 2000, if it makes any
difference.

Here's where I stand right now:
1. I've copied the expression into the
Control
Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon
which
the
report
is
based that will return one of three
values,
(1,2,3),
and
has a data type of Number, Integer.

3. I'm also returning a Comment field in
the
query

I'm not very good with expressions, as
I've
found
very
little resource material that describes
them
well.
If I
understand the function of the Choose
expression, it
should automatically select the item from
the
parenthetical that corresponds to the
integer
returned
by
the query? In other words, if the value
of
InvoiceLabelLocation is 1, then the first
literal
enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the
second,
and
(wild
guess here) if 3, then it will display the
Comment
value
from the field list?

Anything else I can think of??? The
report is
based
on
a
query, and all of the fields are returned
by
the
query,
but the InvoiceLabelLocation and Comment
fields
do
come
from different source tables. I may be
grasping at
straws, but I know there must be a way to
make
this
work
(It all seems so very simple).

If you have any additional suggestions for
making
this
work, I would appreciate it very much!

Scott A




-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On
Equipment", "In
Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


message
[email protected]...
Still trying to get text equivalents
for
option
group
values to display on a report. My
option
group
stores
three values, two of which I would
like to
translate
into
text eqivalents on a report.

In the Control Source of the text box
on
the
report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On
Equipment",
IIf
([InvoiceLabelLocation]=2, "In
Documentation))

where InvoiceLabelLocation is the field
returned
by
the
query upon which the report is based.

I have tried several variants of this
expression,
all
resulting in my personal
favourite, "The
expression
you
entered contains invalid syntax" error.

Any assistance in modifying this
expression
would be
greatly appreciated.

Scott A


.



.



.

.



.



.



.

.


.
 
There were two issues with Scott's report:
1) The name of the control was the same as the field
2) There were Null values in the field

--
Duane Hookom
MS Access MVP


Duane Hookom said:
Are you sure you are storing a numeric value in your table?
You can email me privately and I will describe how you can send me your new
test mdb for me to look at (if you wish).
(e-mail address removed)

--
Duane Hookom
Microsoft Access MVP


Scott A said:
I created a db file with only the source tables, the
query, and the report. No forms, no cal control, and still
(!) the expression doesn't work.

If you have any idea as to what might be wrong, I would
love to know...

Scott
-----Original Message-----
I think if you remove the reference to the library and have code that uses
the library, you will experience issues.
If I were you, I would create a new, blank mdb and import just the table(s)
that are required to produce a very limited experiment with the expression I
posted a while back. Test it. If it works in the new mdb then your issue is
not with the expression but with some other part of your application/mdb.

--
Duane Hookom
Microsoft Access MVP


the reason I ask is that I removed the reference to the MS
Calendar Control library, and still couldn't get this
expression to work.

-----Original Message-----
Understood - I'll check it out.

For testing purposes, will it be enough to de-select the
library from my references list, or do I have to to
something else to remove it?

-----Original Message-----
I think I got the form from an Access Developers
Handbook by Getz,
Reddick,... It wouldn't be appropriate to share. The
book is well worth the
price.

--
Duane Hookom
MS Access MVP


Is it something you would be willing to share?

I'd like to get rid of the one I'm using anyway. It
has
some really user-unfriendly behaviors.

-----Original Message-----
If you reference the Calendar library on one PC but
not
the other, this can
often cause issues with code and expressions. This may
also happen with
different versions of libraries. This is one reason I
rarely if ever use
other controls. I have a calendar form that I either
created or stole from
someplace that I use in place of the calendar control.

--
Duane Hookom
Microsoft Access MVP


Yes I do. Is there a conflict?


-----Original Message-----
Do you have the Calendar control loaded on your
work
pc?

--
Duane Hookom
MS Access MVP


message
This is amazingly frustrating. I tried entering
the
expression in a field on my home computer and was
able
to
exit the field without getting an error, but
can't
get
the
code to work at the office (where I obviously
need
it
more!)

Here at the office I've checked for missing
reference
(all
are present and accounted for), and compiled the
VBA
project code. Now I've tried the expression
again
and
still get the same error...

I see no reason why this shouldn't work - and
I've
retyped
every character.
-----Original Message-----
I'm using VBA, Acces 9.0 Objects, DAO 3.6, ADO
2.1,
OLE
Automation, and an Active X calendar control
(9.0)

Which library is required to run this
expression (I
only
activate the ones required to run the DB).


-----Original Message-----
Have you checked your references? Open any code
module
and select
Tools|References to see if any are MISSING. If
so,
uncheck them and attempt
to compile the project.

--
Duane Hookom
Microsoft Access MVP


message
[email protected]...
absolutely - still no success...

-----Original Message-----
You did include the "="?

--
Duane Hookom
MS Access MVP


"Scott A" <[email protected]>
wrote
in
message
[email protected]...
I tried it, but am still getting a syntax
error
(and
more
grey hair!)

I'm using Access 2000, if it makes any
difference.

Here's where I stand right now:
1. I've copied the expression into the
Control
Source
property of a text box control named
txtInvoiceLabelLocation.

2. I've got a field in the query upon
which
the
report
is
based that will return one of three
values,
(1,2,3),
and
has a data type of Number, Integer.

3. I'm also returning a Comment field in
the
query

I'm not very good with expressions, as
I've
found
very
little resource material that describes
them
well.
If I
understand the function of the Choose
expression, it
should automatically select the item from
the
parenthetical that corresponds to the
integer
returned
by
the query? In other words, if the value
of
InvoiceLabelLocation is 1, then the first
literal
enclosed
in "" will display in the text box
txtInvoiceLabelLocation, if 2, then the
second,
and
(wild
guess here) if 3, then it will display the
Comment
value
from the field list?

Anything else I can think of??? The
report is
based
on
a
query, and all of the fields are returned
by
the
query,
but the InvoiceLabelLocation and Comment
fields
do
come
from different source tables. I may be
grasping at
straws, but I know there must be a way to
make
this
work
(It all seems so very simple).

If you have any additional suggestions for
making
this
work, I would appreciate it very much!

Scott A




-----Original Message-----
Did you try:
=Choose([InvoiceLabelLocation], "On
Equipment", "In
Documentation",
[Comment] )

--
Duane Hookom
Microsoft Access MVP


message
[email protected]...
Still trying to get text equivalents
for
option
group
values to display on a report. My
option
group
stores
three values, two of which I would
like to
translate
into
text eqivalents on a report.

In the Control Source of the text box
on
the
report, I
have the following expression:

=IIf([InvoiceLabelLocation]=1, "On
Equipment",
IIf
([InvoiceLabelLocation]=2, "In
Documentation))

where InvoiceLabelLocation is the field
returned
by
the
query upon which the report is based.

I have tried several variants of this
expression,
all
resulting in my personal
favourite, "The
expression
you
entered contains invalid syntax" error.

Any assistance in modifying this
expression
would be
greatly appreciated.

Scott A


.



.



.

.



.



.



.

.



.
 
Back
Top