DLookUp Results won't display in table (1 Viewer)

Mother_weaver

New member
Local time
Yesterday, 17:23
Joined
Dec 27, 2019
Messages
9
Hey Everyone!!!

I have a form that collects data by data entry. When you enter in a SSN it pulls in the individuals info and when you put in the contractor ID # it will display the contractor name. Everything works GREAT, however the contractor name will not display in the table. It shows the contractor ID # but not the name of the contractor. Database is attached and a work in progress, however this problem has been a thorn in my side. New to Access and trying to learn. Thanks for any and all help!!
 

jdraw

Super Moderator
Staff member
Local time
Yesterday, 20:23
Joined
Jan 23, 2006
Messages
15,364
I don't see an attached database???
 

namliam

The Mailman - AWF VIP
Local time
Today, 01:23
Joined
Aug 11, 2003
Messages
11,696
No database, however (ab)using DLookup is a bad idea instead try using subforms or drop downs or a proper SQL statement to fetch your data
 

bob fitz

AWF VIP
Local time
Today, 00:23
Joined
May 23, 2011
Messages
4,717
Everything works GREAT, however the contractor name will not display in the table. It shows the contractor ID # but not the name of the contractor.
Assuming that ContractorID is the PK of the Contractors table, then every thing is correct. You don't need, nor would you want the contractors name in a related table.

BTW I couldn't find a file attached
 

Mother_weaver

New member
Local time
Yesterday, 17:23
Joined
Dec 27, 2019
Messages
9
Bob,
Thank ya hon!! So when I create a report to display each contractors report of reported hours, how would I expect it to display? Distinguish a relationship between the 2 tables and it should pull it in correctly? Oh never mind, I'm answering my own questions! Maybe I'm making this more difficult than it really is! Unable to upload the DB, it won't accept the file.
 

jdraw

Super Moderator
Staff member
Local time
Yesterday, 20:23
Joined
Jan 23, 2006
Messages
15,364
We need to see your tables (design) . It all starts with tables and relationships.
As for attaching a file:
-have you done a compact and repair to minimize the size
-create a zip file to further reduce attach size.

Are you getting an error re Attaching the file??
 

bob fitz

AWF VIP
Local time
Today, 00:23
Joined
May 23, 2011
Messages
4,717
Base your report on a query which has both related tables and then you can bind controls on the report to fields in either table.

You may be able to attach db if you 'Zip' it first
 

Users who are viewing this thread

Top Bottom