INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Link Fields from 2 tables ina form

Link Fields from 2 tables ina form

(OP)
Hi

Is it possible to link 2 fields in a form from 2 different tables, so it then shows information from both tables.

I have a customer table and a salesrep table. I want to show the salesrep name on the form.

I have linked the tables using the salesrepid.

I have tried to add the name field from the salesrep table (=[dbo_SalesRep]![Name]) to the form with the customer information but all I get is #Name?

I know I can do this in a query but wondered if it was possible to do it just adding the field in rather than have querys.

Any ideas please.

Thanks

RE: Link Fields from 2 tables ina form

Using a query would be the simpler, cleaner, and normal way to do it. Not sure why you would want a work around. But you could use a calculated control and a dlookup with a where clause or a subform that holds the salesrep info and link it by salesrep id. What you propose makes no sense.
(=[dbo_SalesRep]![Name])
Even if you could do this, which you cannot, how would it know which salesrep name to show.

RE: Link Fields from 2 tables ina form

(OP)
Yes your right, no idea why I though it this way, I will use query's.

Thanks

RE: Link Fields from 2 tables ina form

I expect the easiest, most common solution is to use a combo box bound to the SalesRepID with a Row Source like:

CODE --> sql

SELECT SalesRepID, [Name] FROM tblSalesReps ORDER BY [Name]; 

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close