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 » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Set report to show project name instead of its ID



 
 
Thread Tools Display Modes
  #1  
Old July 18th, 2007, 06:45 PM posted to microsoft.public.access.reports
AntonioMachado via AccessMonster.com
external usenet poster
 
Posts: 4
Default Set report to show project name instead of its ID

I have a tblProject that contains Projects and its activities.

Since each project has more than one activity, I put the activities in
tblActivity, using ProjectID as a foreign key in tblActivity (ProjectID is
the primary key in tblProject).

I set tblActivity ProjectID field to show project name because it’s easier
for me to check if the activities where assigned to the correct project
reading the project name instead of its ID.

I did this on tblActivity datasheet view, selecting “Lookup” sheet and
creating a query on “Rowsource” field (query shows project name instead of
its ID).

Now I tried to make a report, grouped by project, showing each project name
and all its activities.

I set the report’s RecordSource to tblActivity.

I used the wizard to do the report, adding ProjectID field. But instead of
showing project name, it’s showing ProjectID (number).

If I was able to set ProjectID field to show project name in tblActivity, why
can’t I do the same when I use tblActivity’s ProjectID field in the report?

How do I correct this?

Thank you very much,
Antônio Machado.

--
Message posted via http://www.accessmonster.com

  #2  
Old July 18th, 2007, 07:29 PM posted to microsoft.public.access.reports
Steve[_10_]
external usenet poster
 
Posts: 608
Default Set report to show project name instead of its ID

Base your report on a query that includes TblActivity and TblProject and
include the project name field.

BTW, it's a very bad idea to use the Lookup feature!!

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications





"AntonioMachado via AccessMonster.com" u35762@uwe wrote in message
news:755dda9754eeb@uwe...
I have a tblProject that contains Projects and its activities.

Since each project has more than one activity, I put the activities in
tblActivity, using ProjectID as a foreign key in tblActivity (ProjectID is
the primary key in tblProject).

I set tblActivity ProjectID field to show project name because it's easier
for me to check if the activities where assigned to the correct project
reading the project name instead of its ID.

I did this on tblActivity datasheet view, selecting "Lookup" sheet and
creating a query on "Rowsource" field (query shows project name instead of
its ID).

Now I tried to make a report, grouped by project, showing each project
name
and all its activities.

I set the report's RecordSource to tblActivity.

I used the wizard to do the report, adding ProjectID field. But instead of
showing project name, it's showing ProjectID (number).

If I was able to set ProjectID field to show project name in tblActivity,
why
can't I do the same when I use tblActivity's ProjectID field in the
report?

How do I correct this?

Thank you very much,
Antnio Machado.

--
Message posted via
http://www.accessmonster.com



  #3  
Old July 18th, 2007, 07:32 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Set report to show project name instead of its ID

Using Lookup fields in tables is generally consider a bad idea. You should
simply add tblProject to your report's record source. Join the ProjectID
fields and make sure you add the project name field in the query output.

--
Duane Hookom
Microsoft Access MVP


"AntonioMachado via AccessMonster.com" wrote:

I have a tblProject that contains Projects and its activities.

Since each project has more than one activity, I put the activities in
tblActivity, using ProjectID as a foreign key in tblActivity (ProjectID is
the primary key in tblProject).

I set tblActivity ProjectID field to show project name because it’s easier
for me to check if the activities where assigned to the correct project
reading the project name instead of its ID.

I did this on tblActivity datasheet view, selecting “Lookup” sheet and
creating a query on “Rowsource” field (query shows project name instead of
its ID).

Now I tried to make a report, grouped by project, showing each project name
and all its activities.

I set the report’s RecordSource to tblActivity.

I used the wizard to do the report, adding ProjectID field. But instead of
showing project name, it’s showing ProjectID (number).

If I was able to set ProjectID field to show project name in tblActivity, why
can’t I do the same when I use tblActivity’s ProjectID field in the report?

How do I correct this?

Thank you very much,
Antônio Machado.

--
Message posted via http://www.accessmonster.com


  #4  
Old July 18th, 2007, 07:38 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Set report to show project name instead of its ID

AntonioMachado via AccessMonster.com wrote:

I have a tblProject that contains Projects and its activities.

Since each project has more than one activity, I put the activities in
tblActivity, using ProjectID as a foreign key in tblActivity (ProjectID is
the primary key in tblProject).

I set tblActivity ProjectID field to show project name because its easier
for me to check if the activities where assigned to the correct project
reading the project name instead of its ID.

I did this on tblActivity datasheet view, selecting Lookup sheet and
creating a query on Rowsource field (query shows project name instead of
its ID).

Now I tried to make a report, grouped by project, showing each project name
and all its activities.

I set the reports RecordSource to tblActivity.

I used the wizard to do the report, adding ProjectID field. But instead of
showing project name, its showing ProjectID (number).

If I was able to set ProjectID field to show project name in tblActivity, why
cant I do the same when I use tblActivitys ProjectID field in the report?



You are tying yourself in knots using those bleep lookup
fields where what you see is NOT what you get. Change it
back to a text box and either learn with the ID number or
create a query that Joins the two tables to get the name.

You will need that query anyway, because using it as the
report's Record Source is the solution to your report
problem.

--
Marsh
MVP [MS Access]
 




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 07:18 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.