Print Customer Name instead of cutomer ID listed on form? (1 Viewer)

AccessBeginner99

New member
Local time
Today, 07:25
Joined
Jan 14, 2024
Messages
2
Does anyone know how I can print the customer name from a form that only displays the customer ID?

Thank you,

AB99
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:25
Joined
Oct 29, 2018
Messages
21,473
Hi. Welcome to AWF!

Yes, you can join the lookup table in your query and add the name column.

PS. I moved your thread out of the Introduction forum.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 07:25
Joined
Feb 28, 2001
Messages
27,186
What theDBguy said is correct, but with a caveat... is the ID/name combination in a table of its own or is it part of a Lookup Field?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 08:25
Joined
Feb 19, 2002
Messages
43,275
You don't provide much in the way of context so let me add some so I can go into more detail than theDBGuy did. You are also talking about printing a form which you should not be doing. Reports are optimized for printing. Forms are not.

On your Invoice form, you have a combo that allows you to pick a customer. The combo shows the customer but the CustomerID is what is saved to the table. Now, you want to create an Invoice report so you bind the main report to the Order table but all it has is the CustomerID and you want to show the name and billing address on the invoice. The solution is to create a query that joins the order table to the customer table on CustomerID and selects the relevant customer fields from the customer table as well as the relevant order fields from the order table. Then you use this new query as the RecordSource for the Invoice.
 

Users who are viewing this thread

Top Bottom