Go Back   Access World Forums > Microsoft Access Discussion > Tables

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 02-10-2019, 06:36 PM   #1
pcastner1
Newly Registered User
 
Join Date: Dec 2018
Posts: 19
Thanks: 2
Thanked 0 Times in 0 Posts
pcastner1 is on a distinguished road
Report

In my report I'm trying to use the job title field to pull the first and last name. Can anyone steer me in the right direction?

pcastner1 is offline   Reply With Quote
Old 02-10-2019, 06:43 PM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 4,145
Thanks: 46
Thanked 971 Times in 952 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Report

Hi. Can you give us more information to go on? How are the information related? Are they stored in the same or separate tables?
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 02-10-2019, 06:48 PM   #3
pcastner1
Newly Registered User
 
Join Date: Dec 2018
Posts: 19
Thanks: 2
Thanked 0 Times in 0 Posts
pcastner1 is on a distinguished road
Re: Report

The names fields and job title fields are all in the same table.

pcastner1 is offline   Reply With Quote
Old 02-10-2019, 07:03 PM   #4
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 4,145
Thanks: 46
Thanked 971 Times in 952 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Report

So then, I am not sure I understand the problem. If the job title is available, the names should be too. Have you tried binding the textbox to the appropriate field?
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 02-10-2019, 07:08 PM   #5
pcastner1
Newly Registered User
 
Join Date: Dec 2018
Posts: 19
Thanks: 2
Thanked 0 Times in 0 Posts
pcastner1 is on a distinguished road
Re: Report

If I have a job title of let say "Director" I wanted maybe a Dlookup to find who is the director and put their name in and so on. Im basically building an organizational chart.
pcastner1 is offline   Reply With Quote
Old 02-10-2019, 07:13 PM   #6
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 4,145
Thanks: 46
Thanked 971 Times in 952 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Report

Hi. But you said both title and names are in the same table. Are you now saying the report is not based on the same table as the one with the title and names? If so, why not? Please remember, we can’t see your database, so unless you give us enough details, we can’t give you any specific advice. If you want to use DLookup(), what have you tried and what happened? Maybe we can help you fix it.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 02-10-2019, 07:29 PM   #7
pcastner1
Newly Registered User
 
Join Date: Dec 2018
Posts: 19
Thanks: 2
Thanked 0 Times in 0 Posts
pcastner1 is on a distinguished road
Re: Report

I only have one table "Contacts", the report is based off that table. On the report I have an unbound "Job Title" field, which I put the names in myself. I also have an unbound filed for the "First and Last Name". What I'm trying to do is have the report look at the job title and fill in the "First and Last Name". Hope this makes sense.

pcastner1 is offline   Reply With Quote
Old 02-10-2019, 07:36 PM   #8
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 4,145
Thanks: 46
Thanked 971 Times in 952 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Report

Hi. I’m sorry but it still doesn’t make sense. You can’t really have an unbound textbox on a report and expect the user to enter a job title on it. If, on the other hand, you are entering the job title in the report’s design view, then why can’t you just enter the names at the same time? Again, without seeing what you got, it’s hard to imagine what you really need. Please consider posting some screenshots or a demo of your database.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 02-10-2019, 07:57 PM   #9
pcastner1
Newly Registered User
 
Join Date: Dec 2018
Posts: 19
Thanks: 2
Thanked 0 Times in 0 Posts
pcastner1 is on a distinguished road
Re: Report

Here is the database. In the report I tried this in the control source of the "Name" field,

= DLookup("[LastName]", "Contacts", _"[JobTitle] = Director"),
Attached Files
File Type: zip Contacts1.accdb.zip (87.6 KB, 9 views)
pcastner1 is offline   Reply With Quote
Old 02-10-2019, 10:51 PM   #10
JHB
Have been here a while
 
Join Date: Jun 2012
Location: In the south of Denmark (Jutland), near the German border.
Posts: 7,709
Thanks: 2
Thanked 2,075 Times in 2,030 Posts
JHB has a spectacular aura about JHB has a spectacular aura about
Re: Report

Quote:
Originally Posted by pcastner1 View Post
Here is the database. In the report I tried this in the control source of the "Name" field,

= DLookup("[LastName]", "Contacts", _"[JobTitle] = Director"),
What report, what control, (seems not to exist a control with that name)?
When you post a database, please post some sample data + an exactly description how to reproduce the problem.
__________________
If the above post has helped you, why not take the time to say thank you, by pressing the "Thumbs up."
JHB is offline   Reply With Quote
Old 02-11-2019, 05:15 AM   #11
pcastner1
Newly Registered User
 
Join Date: Dec 2018
Posts: 19
Thanks: 2
Thanked 0 Times in 0 Posts
pcastner1 is on a distinguished road
Re: Report

I reposted the Database with the report (Org Chart). I think once you see it you will understand what I'm trying to do. I really appreciate the help!
pcastner1 is offline   Reply With Quote
Old 02-11-2019, 06:29 AM   #12
JHB
Have been here a while
 
Join Date: Jun 2012
Location: In the south of Denmark (Jutland), near the German border.
Posts: 7,709
Thanks: 2
Thanked 2,075 Times in 2,030 Posts
JHB has a spectacular aura about JHB has a spectacular aura about
Re: Report

I hope you like the solution!
Quote:
Originally Posted by pcastner1 View Post
I reposted the Database with the report (Org Chart). I think once you see it you will understand what I'm trying to do. I really appreciate the help!
Please tell, where you did repost the database?
__________________
If the above post has helped you, why not take the time to say thank you, by pressing the "Thumbs up."

Last edited by JHB; 02-11-2019 at 06:36 AM.
JHB is offline   Reply With Quote
Old 02-13-2019, 04:43 AM   #13
pcastner1
Newly Registered User
 
Join Date: Dec 2018
Posts: 19
Thanks: 2
Thanked 0 Times in 0 Posts
pcastner1 is on a distinguished road
Re: Report

Here is the database with the report.
Attached Files
File Type: zip Contacts1 9.33.01 PM.accdb.zip (91.0 KB, 10 views)
pcastner1 is offline   Reply With Quote
Old 02-13-2019, 09:03 PM   #14
Cronk
Newly Registered User
 
Join Date: Jul 2013
Posts: 2,132
Thanks: 3
Thanked 464 Times in 457 Posts
Cronk will become famous soon enough Cronk will become famous soon enough
Re: Report

If it is report [Org Chart] that you are trying to generate, then
the control soure for text box Text1 would be
Code:
=DLookUp("[First Name] & ' ' & [Last Name]","Contacts","[Job Title]='" & [Label4].[Caption] & "'")
Have you thought what you are going to do to differentiate between Asst Directors 1 and 2 and .....

You will need to modify your table design to be able then to show who is reporting to a particular Asst Director.

Before worrying about reports, I'd plan your table design to achieve the output as well as input.
Cronk is offline   Reply With Quote
The Following User Says Thank You to Cronk For This Useful Post:
pcastner1 (02-15-2019)
Old 02-15-2019, 08:03 PM   #15
pcastner1
Newly Registered User
 
Join Date: Dec 2018
Posts: 19
Thanks: 2
Thanked 0 Times in 0 Posts
pcastner1 is on a distinguished road
Re: Report

Thanks for the advice I certainly will look at that.

pcastner1 is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Change report filters and report label caption based on form command newdistrict Reports 6 07-23-2017 12:52 PM
Open report button to select data from 7 list boxes and present in a report Gavin59 Forms 19 03-07-2016 07:16 PM
[SOLVED] Open sub report from main report by selecting report name scopes456 Reports 3 12-15-2015 11:01 AM
Does MS Access Report support Hide/Show fields at the Report View time? accesser2003 General 3 06-13-2014 06:15 AM
Invoice report problem, report show items from previous invoices. saltyseadog Reports 1 04-16-2013 07:30 AM




All times are GMT -8. The time now is 03:38 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World