A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IIF Function Assistance



 
 
Thread Tools Display Modes
  #1  
Old May 17th, 2004, 11:59 PM
Steve
external usenet poster
 
Posts: n/a
Default IIF Function Assistance

I have a very simple database that I just created with the following tables:

tblClient
ClientID
ClientFirstName
ClientLastName

tblCaseManagement
CaseMngID
ClientID
EmloyeID
Date
Time
Type
CaseMngNotes

tblCaseMngType
CaseMngTypeID
CaseMngType

tblEmployee
EmployeeID
EmployeeName

I am trying to create a simple report that shows the client name and the
dates they received case management. I'd like for it to show the clients
name at the top and in the detail section I'd like the Date, Employee, Time,
Type, and Notes. I have based my report on a query that includes fields
from tblClient, tblCaseManagement, and tblEmployee. It shows everything I
need except the Type is the CaseMngID. How can I get it to show the
CaseMngType instead of the CaseMngID? I think I need to create a text box
that contains an IIF statement but I'm not sure. Can anyone help me. I
just want it to show Office instead of 1 or Home instead of 2.

TIA
Steve


  #2  
Old May 18th, 2004, 12:56 AM
fredg
external usenet poster
 
Posts: n/a
Default IIF Function Assistance

On Mon, 17 May 2004 15:59:58 -0700, Steve wrote:

I have a very simple database that I just created with the following tables:

tblClient
ClientID
ClientFirstName
ClientLastName

tblCaseManagement
CaseMngID
ClientID
EmloyeID
Date
Time
Type
CaseMngNotes

tblCaseMngType
CaseMngTypeID
CaseMngType

tblEmployee
EmployeeID
EmployeeName

I am trying to create a simple report that shows the client name and the
dates they received case management. I'd like for it to show the clients
name at the top and in the detail section I'd like the Date, Employee, Time,
Type, and Notes. I have based my report on a query that includes fields
from tblClient, tblCaseManagement, and tblEmployee. It shows everything I
need except the Type is the CaseMngID. How can I get it to show the
CaseMngType instead of the CaseMngID? I think I need to create a text box
that contains an IIF statement but I'm not sure. Can anyone help me. I
just want it to show Office instead of 1 or Home instead of 2.

TIA
Steve


Create a query that combines all the tables and fields you intend to
use in the report.
** Make sure the Relationships between the tables are correct. **
Then, instead of dragging the [CaseMngTypeID] field onto the grid (or
in addition to it), drag the [CaseMngType] field.

Now create your Report using this query as it's record source. Drag
the [CaseMngType] field onto the report. It will show the correct text
value instead of the number value of the [CaseMngTypeID].

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
  #3  
Old May 18th, 2004, 01:08 AM
Steve
external usenet poster
 
Posts: n/a
Default IIF Function Assistance

Everytime I try and add the tblCaseMngType to the query and then drag
CaseMngType to the grid I get error Type mismatch in Expression message.

CaseMngTypeID
CaseMngType"fredg" wrote in message

.. .
On Mon, 17 May 2004 15:59:58 -0700, Steve wrote:

I have a very simple database that I just created with the following

tables:

tblClient
ClientID
ClientFirstName
ClientLastName

tblCaseManagement
CaseMngID
ClientID
EmloyeID
Date
Time
Type
CaseMngNotes

tblCaseMngType
CaseMngTypeID
CaseMngType

tblEmployee
EmployeeID
EmployeeName

I am trying to create a simple report that shows the client name and the
dates they received case management. I'd like for it to show the

clients
name at the top and in the detail section I'd like the Date, Employee,

Time,
Type, and Notes. I have based my report on a query that includes fields
from tblClient, tblCaseManagement, and tblEmployee. It shows everything

I
need except the Type is the CaseMngID. How can I get it to show the
CaseMngType instead of the CaseMngID? I think I need to create a text

box
that contains an IIF statement but I'm not sure. Can anyone help me. I
just want it to show Office instead of 1 or Home instead of 2.

TIA
Steve


Create a query that combines all the tables and fields you intend to
use in the report.
** Make sure the Relationships between the tables are correct. **
Then, instead of dragging the [CaseMngTypeID] field onto the grid (or
in addition to it), drag the [CaseMngType] field.

Now create your Report using this query as it's record source. Drag
the [CaseMngType] field onto the report. It will show the correct text
value instead of the number value of the [CaseMngTypeID].

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.



  #4  
Old May 18th, 2004, 02:50 AM
John Vinson
external usenet poster
 
Posts: n/a
Default IIF Function Assistance

On Mon, 17 May 2004 17:08:04 -0700, "Steve"
wrote:

Everytime I try and add the tblCaseMngType to the query and then drag
CaseMngType to the grid I get error Type mismatch in Expression message.


I suspect you're yet another victim of the obnoxious Lookup Wizard
misfeature. Is CaseMngType a Lookup Field in your main table? If so -
that's your problem. It's trying to match the text Type to the numeric
TypeID. Your query should join the numeric TypeID to the numeric
TypeID.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
  #5  
Old May 18th, 2004, 11:50 AM
Steve
external usenet poster
 
Posts: n/a
Default IIF Function Assistance

Thanks to everyone. My problem was different data types. I had the
CaseMngTypeID as a number and the FK Type as text.

"Steve" wrote in message
...
I have a very simple database that I just created with the following

tables:

tblClient
ClientID
ClientFirstName
ClientLastName

tblCaseManagement
CaseMngID
ClientID
EmloyeID
Date
Time
Type
CaseMngNotes

tblCaseMngType
CaseMngTypeID
CaseMngType

tblEmployee
EmployeeID
EmployeeName

I am trying to create a simple report that shows the client name and the
dates they received case management. I'd like for it to show the clients
name at the top and in the detail section I'd like the Date, Employee,

Time,
Type, and Notes. I have based my report on a query that includes fields
from tblClient, tblCaseManagement, and tblEmployee. It shows everything I
need except the Type is the CaseMngID. How can I get it to show the
CaseMngType instead of the CaseMngID? I think I need to create a text box
that contains an IIF statement but I'm not sure. Can anyone help me. I
just want it to show Office instead of 1 or Home instead of 2.

TIA
Steve




 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:41 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.