PC Review


Reply
Thread Tools Rate Thread

Displaying field on report from combox box

 
 
=?Utf-8?B?V0NEb2Fu?=
Guest
Posts: n/a
 
      27th Feb 2006
I'm printing a report from a form and I have a combo box that selects the
type of animal being released...D=Dog,C=Cat,O=Other. I would like to print
the word out on the form instead of just the first letter. I tried using an
unbound text field and using the following statement as the control source:
IIf([AnimalType]="D","Dog","")
but, I keep getting the #Error message. All the other fields print fine,
just the two that are based on combo boxes don't print at all. Any help or
suggestions would be appreciated.
Thanks,
Randy M
 
Reply With Quote
 
 
 
 
=?Utf-8?B?S0FSTCBERVdFWQ==?=
Guest
Posts: n/a
 
      27th Feb 2006
If the cpmbobox data is from a table just add it to the query that is the
records source for the report. Join on the ID and add the narrative field to
the query.

"WCDoan" wrote:

> I'm printing a report from a form and I have a combo box that selects the
> type of animal being released...D=Dog,C=Cat,O=Other. I would like to print
> the word out on the form instead of just the first letter. I tried using an
> unbound text field and using the following statement as the control source:
> IIf([AnimalType]="D","Dog","")
> but, I keep getting the #Error message. All the other fields print fine,
> just the two that are based on combo boxes don't print at all. Any help or
> suggestions would be appreciated.
> Thanks,
> Randy M

 
Reply With Quote
 
=?Utf-8?B?V0NEb2Fu?=
Guest
Posts: n/a
 
      27th Feb 2006
Karl,
I'm relatively new to Access and I'm slowly working my way through. The
data is from a table, but it is already in the query that the report is based
on. I guess what I have is a one character field in the table that has either
a "D","C", or "O" in it. I need to be able to print the whole word on the
report based on this letter. In Cobol I could do it with an IF THEN ELSE, but
I'm not sure how you do this in Access. It looks like it will only allow one
IIF in the control source property of the text box. If you can shed some
light, I'd appreciate it. It seems everytime I think I see the light at the
end of the tunnel, it's really just another train. Thanks for you help.

Randy M

"KARL DEWEY" wrote:

> If the cpmbobox data is from a table just add it to the query that is the
> records source for the report. Join on the ID and add the narrative field to
> the query.
>
> "WCDoan" wrote:
>
> > I'm printing a report from a form and I have a combo box that selects the
> > type of animal being released...D=Dog,C=Cat,O=Other. I would like to print
> > the word out on the form instead of just the first letter. I tried using an
> > unbound text field and using the following statement as the control source:
> > IIf([AnimalType]="D","Dog","")
> > but, I keep getting the #Error message. All the other fields print fine,
> > just the two that are based on combo boxes don't print at all. Any help or
> > suggestions would be appreciated.
> > Thanks,
> > Randy M

 
Reply With Quote
 
=?Utf-8?B?S0FSTCBERVdFWQ==?=
Guest
Posts: n/a
 
      27th Feb 2006
If you only have three then it is easy to use the IIF statement. Open the
query in design view and add this as a column.
Animal: IIf([AnimalType]="D","Dog",IIf([AnimalType]="C","Cat","Other"))

"WCDoan" wrote:

> Karl,
> I'm relatively new to Access and I'm slowly working my way through. The
> data is from a table, but it is already in the query that the report is based
> on. I guess what I have is a one character field in the table that has either
> a "D","C", or "O" in it. I need to be able to print the whole word on the
> report based on this letter. In Cobol I could do it with an IF THEN ELSE, but
> I'm not sure how you do this in Access. It looks like it will only allow one
> IIF in the control source property of the text box. If you can shed some
> light, I'd appreciate it. It seems everytime I think I see the light at the
> end of the tunnel, it's really just another train. Thanks for you help.
>
> Randy M
>
> "KARL DEWEY" wrote:
>
> > If the cpmbobox data is from a table just add it to the query that is the
> > records source for the report. Join on the ID and add the narrative field to
> > the query.
> >
> > "WCDoan" wrote:
> >
> > > I'm printing a report from a form and I have a combo box that selects the
> > > type of animal being released...D=Dog,C=Cat,O=Other. I would like to print
> > > the word out on the form instead of just the first letter. I tried using an
> > > unbound text field and using the following statement as the control source:
> > > IIf([AnimalType]="D","Dog","")
> > > but, I keep getting the #Error message. All the other fields print fine,
> > > just the two that are based on combo boxes don't print at all. Any help or
> > > suggestions would be appreciated.
> > > Thanks,
> > > Randy M

 
Reply With Quote
 
=?Utf-8?B?V0NEb2Fu?=
Guest
Posts: n/a
 
      28th Feb 2006
Karl,
I really do appreciate you're taking the time to try and help me and I
apologize for being such a pest, but I'm not sure if I understand your
answer. I went to the query, at least I think it's the query, it's in the
reports record source property where there's a select statement,...anyhow, I
added the field Animal in a column and then put the IIf statement in the
criteria. Now, it asks for the Animal parameter when I open the report. As I
said, I'm relatively new to Access, so something that might be very simple
for you to see, it's not quite that clear to me yet. Again, I apologize for
being so thick-headed, but I'm still at the 'newbie' stage. Again, thank you
for taking time to try and help me out.
Randy M

"KARL DEWEY" wrote:

> If you only have three then it is easy to use the IIF statement. Open the
> query in design view and add this as a column.
> Animal: IIf([AnimalType]="D","Dog",IIf([AnimalType]="C","Cat","Other"))
>
> "WCDoan" wrote:
>
> > Karl,
> > I'm relatively new to Access and I'm slowly working my way through. The
> > data is from a table, but it is already in the query that the report is based
> > on. I guess what I have is a one character field in the table that has either
> > a "D","C", or "O" in it. I need to be able to print the whole word on the
> > report based on this letter. In Cobol I could do it with an IF THEN ELSE, but
> > I'm not sure how you do this in Access. It looks like it will only allow one
> > IIF in the control source property of the text box. If you can shed some
> > light, I'd appreciate it. It seems everytime I think I see the light at the
> > end of the tunnel, it's really just another train. Thanks for you help.
> >
> > Randy M
> >
> > "KARL DEWEY" wrote:
> >
> > > If the cpmbobox data is from a table just add it to the query that is the
> > > records source for the report. Join on the ID and add the narrative field to
> > > the query.
> > >
> > > "WCDoan" wrote:
> > >
> > > > I'm printing a report from a form and I have a combo box that selects the
> > > > type of animal being released...D=Dog,C=Cat,O=Other. I would like to print
> > > > the word out on the form instead of just the first letter. I tried using an
> > > > unbound text field and using the following statement as the control source:
> > > > IIf([AnimalType]="D","Dog","")
> > > > but, I keep getting the #Error message. All the other fields print fine,
> > > > just the two that are based on combo boxes don't print at all. Any help or
> > > > suggestions would be appreciated.
> > > > Thanks,
> > > > Randy M

 
Reply With Quote
 
=?Utf-8?B?S0FSTCBERVdFWQ==?=
Guest
Posts: n/a
 
      28th Feb 2006
>>I went to the query, at least I think it's the query, it's in the reports
record source property where there's a select statement,...
No that is not the query. A select statement in the reports record source
property is not a query. A name of query in the reports record source
property would be a query.
Go to database view and you will see icon on the left for Objects --
Tables
Queries
Forms
Reports
etc

Click on Queries and then New. Here is where you create queries.

"WCDoan" wrote:

> Karl,
> I really do appreciate you're taking the time to try and help me and I
> apologize for being such a pest, but I'm not sure if I understand your
> answer. I went to the query, at least I think it's the query, it's in the
> reports record source property where there's a select statement,...anyhow, I
> added the field Animal in a column and then put the IIf statement in the
> criteria. Now, it asks for the Animal parameter when I open the report. As I
> said, I'm relatively new to Access, so something that might be very simple
> for you to see, it's not quite that clear to me yet. Again, I apologize for
> being so thick-headed, but I'm still at the 'newbie' stage. Again, thank you
> for taking time to try and help me out.
> Randy M
>
> "KARL DEWEY" wrote:
>
> > If you only have three then it is easy to use the IIF statement. Open the
> > query in design view and add this as a column.
> > Animal: IIf([AnimalType]="D","Dog",IIf([AnimalType]="C","Cat","Other"))
> >
> > "WCDoan" wrote:
> >
> > > Karl,
> > > I'm relatively new to Access and I'm slowly working my way through. The
> > > data is from a table, but it is already in the query that the report is based
> > > on. I guess what I have is a one character field in the table that has either
> > > a "D","C", or "O" in it. I need to be able to print the whole word on the
> > > report based on this letter. In Cobol I could do it with an IF THEN ELSE, but
> > > I'm not sure how you do this in Access. It looks like it will only allow one
> > > IIF in the control source property of the text box. If you can shed some
> > > light, I'd appreciate it. It seems everytime I think I see the light at the
> > > end of the tunnel, it's really just another train. Thanks for you help.
> > >
> > > Randy M
> > >
> > > "KARL DEWEY" wrote:
> > >
> > > > If the cpmbobox data is from a table just add it to the query that is the
> > > > records source for the report. Join on the ID and add the narrative field to
> > > > the query.
> > > >
> > > > "WCDoan" wrote:
> > > >
> > > > > I'm printing a report from a form and I have a combo box that selects the
> > > > > type of animal being released...D=Dog,C=Cat,O=Other. I would like to print
> > > > > the word out on the form instead of just the first letter. I tried using an
> > > > > unbound text field and using the following statement as the control source:
> > > > > IIf([AnimalType]="D","Dog","")
> > > > > but, I keep getting the #Error message. All the other fields print fine,
> > > > > just the two that are based on combo boxes don't print at all. Any help or
> > > > > suggestions would be appreciated.
> > > > > Thanks,
> > > > > Randy M

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying multivalue field data in report Ken Warthen Microsoft Access Reports 0 11th Apr 2010 02:42 PM
report displaying field in different language Christa Microsoft Access Reports 1 31st Dec 2008 02:22 PM
Displaying Text Value in Number field in report. =?Utf-8?B?aGFuYQ==?= Microsoft Access Reports 1 17th Aug 2007 08:16 PM
Displaying a memo field in a report. =?Utf-8?B?Q3JhbW5vcmVncmVi?= Microsoft Access Reports 1 13th Feb 2004 02:10 AM
Avoiding displaying an autonumber field in a report? C Tate Microsoft Access Reports 1 17th Nov 2003 04:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:24 AM.